Hi!
I have a function which let me select a element when its clicked. It goes like this:
$('ul.grid li').click(function() {
var input = $(this).find('input.select-state:first');
var value = input.attr('value');
if (value == '0') {
$(this).addClass('active');
input.attr('value', '1');
} else {
$(this).removeClass('active');
input.attr('value', '0');
}
});
When I add jQuery sortable to this, the element that get dropped is immediately selected when I drop it because this function runs. What is the approach to solve this problem?
Thanks!