I want to call a function after an element has been created. Is there a way to do this?
Example:
$(\"#myElement\").ready(function() {
// call the
You may want to look into jQuery live events. You attach an event handler to a selector that either matches now or after additional elements are created in your DOM.
So if you have a
and you dynamically create new items, in your
$(document).ready()
you can wire up a selector to an event handler so that all of your elements will be wired for that event.
Here's a jsFiddle sample that demos live
.
Hope this helps.