Possible Duplicate:
How to wait until an element exists?
I'm using a jquery plugin to show a modal dialog. the content of that dialog is loaded via ajax. the outermost div
of that content is msg
. As the div msg
doesn't exist when the page is loaded (modal dialog is shown later by clicking a button), I can't apply jquery on that div. e.g. $(".msg").some_Action()
doesn't work.
I know a bit about the on
or live
(deprecated now). But how can I apply it here? or any other solution?
NB: ajax request is handled via the plugin itself, so I can't(or maybe won't) write something on success
of the ajax request