How can i disable drag event using jquery?

Posted by Chirag on Stack Overflow See other posts from Stack Overflow or by Chirag
Published on 2010-05-05T10:08:58Z Indexed on 2010/05/05 10:28 UTC
Read the original article Hit count: 248

Filed under:

Hi,

i wan to disable drag event using jquery and want to bind one another event with same mouse event, but it will shows an error

i have attached drag even to

<div class="mydiv"></div>

and i have used

jQuery('.mydiv').draggable("destroy");

it is disabling the drag event and attached one more functionality on mouse down

but when i will press mouse on div and dragging the cursor then it shows error

$(this).data("draggable") is undefined
[Break on this error] var t = $('body'), o = $(this).data('draggable').options; 

and this is in ui.draggable.js,

any buddy have any idea about this??

© Stack Overflow or respective owner

Related posts about draggable