[jQuery] disable click event while dragging (sortable)
Hello Everybody!
Does somebody know how deactivate the click event on a dragable item while dragging.
I tried to unbind the click event on start, and bind it again on stop. but the initial click (=toggle) is still fired.
Thx everybody! i hope i made my problem clear ;/
chris
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">var $sortable = $(".containerCenterPDF .contentList").sortable({
placeholder: 'dragHighlight',
items:'.toogleBox',
start: function(e) {
//console.log('start')
$('.toogleBox h2 a', this).unbind("click");
},
stop: function(e) {
//console.log('stop')
$('.toogleBox h2 a').click(function(){
$(this).trigger('toggleBox');
});
})</blockquote><div>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> $('.toogleBox h2 a').bind('toggleBox',function(){
$(this).parent().parent().toggleClass('toogleBoxOpen');
return false;
}).click(function(){
console.log('normal')
$(this).trigger('toggleBox');
});
</blockquote></div>