i want to execute some functions only after a dynamically created DIV's content (which will includes text and images) is loaded completely. Here the dynamically created DIV is "#element"+data.
The below is not working.
$("#section"+currSect).delegate( "#element"+data, "load", function()
{ remvPanel(); showFormBox(); }
);
This also not working.
$("#element"+data).load(function() {remvPanel(); showFormBox();});
Please Help! :(
Will this do it?
jQuery .load()
This method is a shortcut for .bind('load', handler).
The load event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object.
For example, consider a page with a simple image:
The event handler can be bound to the image:
A working example: