🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

jQuery.SelectListActions is a jQuery plugin that gives you several actions to perform with Select lists.With this plugin you can:Move selected item(s) from a source list to a destination listMove all items from a source list to a destination listMove selected item(s) from a source list to a destination list and deleting the selected item(s) from the source listMove all items from a source list to a destination list and deleting all items from the source listRemove selected item(s) from a listMove selected item(s) up or down a list

Plugins

Documentation

jQuery.SelectListActions

jQuery.SelectListActions is a jQuery plugin that gives you several actions to perform with Select lists.

With this plugin you can:

  • Move selected item(s) from a source list to a destination list
  • Move all items from a source list to a destination list
  • Move selected item(s) from a source list to a destination list and deleting the selected item(s) from the source list
  • Move all items from a source list to a destination list and deleting all items from the source list
  • Remove selected item(s) from a list
  • Move selected item(s) up or down a list

Usage

Include jquery.selectlistactions.js in your page

<script src="js/jquery.selectlistactions.js"></script>

And then make your calls like this:

Scenario 1: You have two lists and a button to move selected items between the lists, simply add the following:

$('#buttonId').click(function(e) {   $('select').moveToList('#sourceListId', '#destinationListId');   e.preventDefault(); });

Scenario 2: You want to remove one or more items from a list

$('#buttonId').click(function(e) {   $('select').removeSelected('#sourceListId');   e.preventDefault(); });

Scenario 3: You want to move selected items up in a list

$('#buttonId').click(function(e) {   $('select').moveUpDown('#sourceListId', true, false);   e.preventDefault(); });

Scenario 4: You want to move selected items down in a list

$('#buttonId').click(function(e) {   $('select').moveUpDown('#sourceListId', false, true);   e.preventDefault(); });

Demo

I have included an Example folder in this repository that is styled with Bootstrap and some custom CSS.

The examples included are responsive and will look good in desktop as well as mobile.

Take a look at the JSFiddle for quick view

Giving Back

If you liked this plug in and would like to support me, you can click the image below to get me a coffee. I would really appreciate it (but is not required).

Buy Me A Coffee

enjoy!

-Esau Silva


You May Also Like