1

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){});
2
  • are you trying to delegate the drag or just convert to the on method? Commented Jul 30, 2013 at 0:32
  • I need the code to work for appended elements, so I use on() for jquery version 1.10.2. Commented Jul 30, 2013 at 1:22

1 Answer 1

1

Try this: (working jsFiddle)

$(document).on("dragstart",selector,function(ev,dd){ });
Sign up to request clarification or add additional context in comments.

2 Comments

This only works using jquery version 1.7.2, but not 1.10.2. Any other suggestions?
works in this jsFiddle with version 1.10.2. I'm using Chrome if that makes any change..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.