-1

After I append an element with jQuery, I want that element to react to something, say, with on('change'). Normally, I've used AJAX with a server language to get a reaction from an element that was appended, but now I only have a one-page front-end site. What am I missing here?

Dan Sebastian
  • 519
  • 5
  • 19
  • We will need to see your code to have any chance of helping you. – Andrew D Oct 29 '16 at 11:25
  • 2
    The description is very vague, but maybe this question helps: [Jquery event handler not working on dynamic content](https://stackoverflow.com/questions/15090942/jquery-event-handler-not-working-on-dynamic-content) – Andreas Oct 29 '16 at 11:26
  • Yes, Andreas, that's it. It was a question about a general scenario, didn't think a code was needed. Thanks. – Dan Sebastian Oct 29 '16 at 11:33

1 Answers1

-1

Please post your code here. Probably you append element after bind events. Normal binding (like .click()) affects elements already existing in dom. To do dynamic binding you have to use .on() method or (its better for performance) bind action directly to new element

webcitron
  • 124
  • 11