Tuesday 15 September 2015

javascript - How can I call click event when drag and drop event -


I want to change the event drag and drop to click on the event for my object. I try this code < P>

  $ ("a"). Draggable ({start: function (event, ui) {$ (this) .trigger ("click");}});   

but not working: (

Update:

I try this code:

  document.ondragstart = function () {return false;}; document.onmouseup = function (a, b) {$ (this) .trigger ("click");};   

But trigger click still does not work

Try with this modification :

  $ ("a"). Draggable ({start: function (Event, UI) {$ (- your-button-element-here-) click ();}}) ;    

No comments:

Post a Comment