I have this code:
$(".testing").sortable({
helper: fixHelper,
containment:$("testing").parent(),
start:function(){
if($(event.target).hasClass("test")){
alert("hello");
}
if($(this).hasClass("test")){
alert("hello");
}
}
});
I am trying to make a table sortable. However the first table row and the last table row I do not want to be sortable. So I was thinking was to just cancel the event if it was the first row or the last row. However, when I alert the event.target it is telling me that it is the element that is set to the sortable container. How can I actually get the element that was sent to the event. Also does any one know how to cancel the event? is it just return false or event.preventDefault() ?