Jump to content

Enable/disable events?

Go to solution Solved by requinix,

Recommended Posts

I'm using http://api.jqueryui.com/sortable/ and I'd like my table to be unsortable by default, a user clicks something, and then it's sortable, then they click something else and it's not sortable.


I thought I could use these two functions:

function enable_sort() {
	$( ".btf_table tbody:first" ).sortable({
	    helper: fixHelperModified,
	    stop: updateIndex,
	    axis: "y"
	    //handle: '.handle'

function disable_sort() {
	$( ".btf_table tbody:first" ).off();

I can use them, but then I cannot use "enable_sort" again after "disable_sort" is called. I'm sure I'm mis-uisng the "off" function but I'm not sure what I'm supposed to be calling instead, or with which parameters.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.