Reputation: 10684
I have 2 varients in my code.
I have a table that i add sortable()
to and if you swap the comments, it adds to it sortable({cancel:"th"});
I was curious how to do this? How would i make it so if i click the textbox has focus, but if i drag it will start the sorting procedure.
Right now, if i do 1 way, it wont let me focus to add text, and if i do it the other way, it does not make it easy to grab to sort the object
Upvotes: 0
Views: 38
Reputation: 22527
You need to cancel the inputs as well. I would give the table elements some padding and background color, or look into a draggable handle element.
$("table.title > tbody").sortable({cancel:"input, th"});
Upvotes: 1