Monday, 26 August 2013

Catch the click that unselects all in a selectable

Catch the click that unselects all in a selectable

Im using jQuery selectable plugin. Im looking for a way to catch the click
event that unselects all, by clicking inside the selectable.
I have been reading the code for this plugin but I cant find where the
magic happens.
If I catch the click event on the selectable, it works if I use a
setTimeout, but I would rather skip that.
$(selector).selectable();
$(selector).click(function () {
setTimeout(function () {
//Deselect of all items have occured
}, 1);
});

No comments:

Post a Comment