I’m using the .load() function to load a section of html that has some jQuery functionality that is bound to a certain class. =/
thoughts?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use live events:
jQuery keeps a repository of all live selectors such as
.classNamein this case. And it adds a handler to the document to listen for events that bubble up to the document. This special handler then basically runs through all the live selectors and forwards the event to those elements that match the live selectors, if any.If any of the intermediate event handlers intercept the event and stop it from further propagating before it reaches up to the document, the
livehandlers will not be executed.