Enable jQuery collation

I will turn off the drag and drop of the jquery sort list, but don't know how to turn it back on, can someone point me in the direction please

$(".anotherClass").sortable('disable'); //it disables it 

I can not find anything in the documentation.

This question says enable input here, but not working

 $("#wantedItems").sortable({ receive: function (event, ui) { //enable the input here which input ??????????????????????????????? } }); 
+7
source share
4 answers

You just call it with 'enable'

 $( ".selector" ).sortable( "enable" ); 

Documentation for the method: http://api.jqueryui.com/sortable/#method-enable

+4
source
 simply write..... $(".anotherClass").sortable() 
+1
source

enable ()

Allows you to sort.

  • This method takes no arguments.

Code Examples:
Call the enable method:

 $( ".selector" ).sortable( "enable" ); 

Link: http://api.jqueryui.com/sortable/#method-enable

0
source

To enable sortable() again, you can use

$(".anotherClass").sortable("enable");

To enable / disable button click with toggleButton

 $('#toggleButton').click(function() { //check if sortable() is enabled and change and change state accordingly // Getter var disabled = $(".anotherClass").sortable( "option", "disabled" ); if (disabled) { $(".anotherClass").sortable( "enable" ); } else { $(".anotherClass").sortable("disable"); } }); 
0
source

All Articles