user2171842
user2171842

Reputation:

How to convert jQuery function to on() method

I have a function from the jquery.event.drop plugin found at http://threedubmedia.com/code/event/drop/demo/selection:

$(selector).drag("start", function( ev, dd ){});

How can I convert this to work using the on() method?

Something like this (not working):

$(document).on("drag", selector, "start", function(ev, dd){});

Upvotes: 1

Views: 117

Answers (1)

Yotam Omer
Yotam Omer

Reputation: 15376

Try this: (working jsFiddle)

$(document).on("dragstart",selector,function(ev,dd){ });

Upvotes: 1

Related Questions