Friday 15 March 2013

jquery - Click on a draggable initiates dragging -



jquery - Click on a draggable initiates dragging -

i have tree structured ul li element in page. made leaf li draggable. can drag , drop these li between immediate parent li.

everything going fine except 1 problem. if click on li, started dragging , required click stop.

just information, using jquery treeview plugin create ul li construction treeview.

any help regarding appreciated.

we had similar kind of issue due clash of jquery context menu , draggable.

update below code in jquery context menu script file.

ref : jquery context menu clashes jquery draggable more info.

jquery(this).mousedown( function(e) { var evt = e; if (e.button == 2) //added create compatible draggable evt.stoppropagation(); jquery(this).mouseup( function(e) { if (e.button == 2) //added create compatible draggable e.stoppropagation(); var srcelement = jquery(this);

hope helps.

jquery jquery-draggable

No comments:

Post a Comment