Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. MoveMenuItems

MoveMenuItems

Scheduled Pinned Locked Moved JavaScript
toolshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dungas
    wrote on last edited by
    #1

    Good day I have this web page to create which has three columns ,in the left and the right columns I created two selection lists.Now i have to write a script that moves the selection list items between the two columns.please some body help me out.

    J M 2 Replies Last reply
    0
    • D Dungas

      Good day I have this web page to create which has three columns ,in the left and the right columns I created two selection lists.Now i have to write a script that moves the selection list items between the two columns.please some body help me out.

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      You would have to make the columns as containers, like div tags and give them id values, And then use JQuery, to empty the values in one container, and copy the values from the first container to the 2nd container. Something like this, off the top of my head and not tested, just an example to give you and idea how.

      $(#container2).empty();
      var htmlMarkup = $(#container1).html();
      $(#container2).html(htmlMarkup);

      [edit]
      it might be on the last line
      $(#container2).append(htmlMarkup);

      1 Reply Last reply
      0
      • D Dungas

        Good day I have this web page to create which has three columns ,in the left and the right columns I created two selection lists.Now i have to write a script that moves the selection list items between the two columns.please some body help me out.

        M Offline
        M Offline
        Moykn
        wrote on last edited by
        #3

        Use jQuery Sortable

        $( "#sortable1, #sortable2" ).sortable({
             connectWith: ".connectedSortable";
        }).disableSelection();
        

        Just make sure to give your "columns" the class "connectedSortable". for reference: http://jqueryui.com/sortable/#connect-lists[^]

        Sorry, my english is bad!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups