Jquery moving all items in listbox at once

jQuery example of moving single element from one list to another http://jsfiddle.net/RbLVQ/60/ Javascript: $(document).ready(function() { $(‘#btnRight’).click(function(e) { var selectedOpts = $(‘#lstBox1 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox2’).append($(selectedOpts).clone()); $(selectedOpts).remove(); e.preventDefault(); }); $(‘#btnLeft’).click(function(e) { var selectedOpts = $(‘#lstBox2 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox1’).append($(selectedOpts).clone()); $(selectedOpts).remove();… Continue reading Jquery moving all items in listbox at once