JQuery drop down box application sample introduction


Realize two drop - down box data movement, append


$('#add').click(function(){
var $options = $('#select1 option:selected'); //Gets the selected item
var $remove = $options.remove();
$remove.appenTo('#select2');
});

Simplify the following


$('#add').click(function(){
var $options = $('#select1 option:selected'); //Gets the selected item
$remove.appenTo('#select2');
});