Here goes my html code
add > >
and Javascript code
$("#add").click(function(){
$("#select1 option:selected").remove().appendTo($("#select2"));
})
$("#remove").click(function(){
$("#select2 option:selected").remove().appendTo($("#select1"));
})
Make sure you imported jquery.js file.