I’m using jcrop for jquery to crop images. To use it, I’m using $(function(){ $('#jcrop').Jcrop(); });.
My problem is that, the target element #jcrop is generated using ajax. So when I use the above code, it doesn’t recognized the DOM element.
How do I change the code to make it work with .live()??
Delegate is an alternative to the .
live()method and is the recommended way to go. Delegate your event to run when dynamic #jcrop element is loaded: