jQuery moving MultiSelect values to another MultiSelect

前端 未结 8 1329
感情败类
感情败类 2020-12-23 12:27

So I have a MultiSelect box with x values which I need the ability to move to another MultiSelect box and vise versa.


        
        
        
        
    

jquery

$('#select1').click(function () {
     return !$('#select1 option:selected').remove().appendTo('#select2');
});

$('#select2').click(function () {
     return !$('#select2 option:selected').remove().appendTo('#select1');
 });

if want a button add a add >> and jquery click selector here

example http://jsfiddle.net/diffintact/GJJQw/3/

提交回复
热议问题