Introduction:In my previous article I have explained about Add remove select and set items in select drop down list. In this article I am going to explain about how to move items from left side to write side using jQuery
For example in my form I have two dropdown lists one with id “allcities” and another one with id “selectedcities”. And I have two buttons one for moving item from left to right (btnleft) and another one is to move item from right to left (btnright). Below is the html code.
Now i have included the below jquery library into the page
After that I have defined the functionality for two buttons in document.ready
Below is the code.
The above code will move items from left to right and vice versa.
Do you like this article? Help us to improve. Please post your comments below.