Move selected players from one multiple-select list to another, move them back, or move all options at once. This pattern works for team building, permissions and category assignment.
$( "#move-right" ).on( "click", function () {
$( "#available-team option:selected" )
.appendTo( "#selected-team" );
});
$( "#move-left" ).on( "click", function () {
$( "#selected-team option:selected" )
.appendTo( "#available-team" );
});
$( "#move-all-right" ).on( "click", function () {
$( "#available-team option" )
.appendTo( "#selected-team" );
});
$( "#move-all-left" ).on( "click", function () {
$( "#selected-team option" )
.appendTo( "#available-team" );
});
← Listbox tutorial · Database dropdowns
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.