drop function inside on dragstart function
This is my function
iPictureframe.find("img").on("dragstart", function(event, ui) {
iframe.find(".wpEdit img").on("drop", function(event, ui) {
myFunction()
});
});
My problem here is that, an on drop event handler will be added to " iframe.find(".wpEdit img") "
so whenever anything is droped on " iframe.find(".wpEdit img") " it runs myFunction,
but I ONLY want " iPictureframe.find("img") " to be only dropable element to run myFunction()
How can i accomplish that?