-2

Possible Duplicate:
Is there a jQuery DOM change listener?
Event when element added to page

Is there a jQuery event for when elements are added to the document?

Edits

OK, wait a minute! Geesh! I'm using knockoutjs and it dynamically adds elements. And I have to add something like the following to my text boxes:

$(document).ready(function () {
    ko.applyBindings(new EditCatalogViewModel());
});

Further Edits

I guess my question will just have to go unanswered. Thanks SOOO much.

Community
  • 1
  • 1
Jordan
  • 9,642
  • 10
  • 71
  • 141
  • 2
    http://api.jquery.com/category/events/ – ahren Aug 13 '12 at 01:20
  • 3
    Possible duplicate: http://stackoverflow.com/q/7434685/1188942 – jeff Aug 13 '12 at 01:21
  • Why are you down voting me? I've been searching for an answer for this for hours. That "Possible duplicate" doesn't work for me. – Jordan Aug 13 '12 at 01:23
  • See DOM4 Mutation Observers: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html. I've [previously posted an answer](http://stackoverflow.com/a/11546242/710446) about how to use them (and the entire linked question may be of use to you). They might be the best solution for your needs, but, to my knowledge, they are currently only supported in Chrome and Firefox. – apsillers Aug 13 '12 at 01:28
  • See the [`livequery`](http://docs.jquery.com/Plugins/livequery) plugin .. (I have no idea by which magic it works) –  Aug 13 '12 at 01:31
  • @Jordan, you never explained *why* the proposed duplicates were unacceptable for your needs. The proposed duplicates match you original one-line question perfectly, and I don't see how your edit differentiates your question from the proposed duplicates. If you can explain how your needs are sufficiently different, I'll be happy to vote to re-open the question. – apsillers Aug 13 '12 at 12:43
  • I was going to, but then my question was closed. So I figured it was too late. My question was closed five minutes after I asked it. – Jordan Aug 13 '12 at 14:00
  • This question was closed because the question *as written* (regardless of what your *intent* was) is a duplicate of those other questions. You could open a new question using as much information about *your specific situation* as possible, and if you are indeed correct that your situation is substantially different from these duplicates then your question will also not be a duplicate of this question. If you do post a new question, be sure to note that you posted a broader variant of the same question (and link to this question), but now you want an answer bound by more narrow constaints. – apsillers Aug 13 '12 at 15:27

1 Answers1

2

No there is not, if you look at the list of jQuery events, it's not listed. However, you can create your own listener and event if you know ahead of time where the element will be added.

Igor
  • 33,276
  • 14
  • 79
  • 112