lets say daedalus has a page where he gets some content with jquery
he hides the content container makes the request with the get method changes the content of the content container then shows the content container
that works fine and dandy but now consider that there is content in the new page that needs to be checked for elements that jquery may have something to say about
what does he do then?
jquery question
Moderator: General Moderators
Re: jquery question
You're wondering how to attach listeners to the content you retrieve via AJAX?
- Use the new .live() function in jQuery 1.3.1 . However, I've had issues with it in IE7 OR
- After you load the content, call a callback function that re-attaches the necessary listeners
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: jquery question
i was considering using the live function but these handlers are going to be specific to each page and i didnt think that was the intention of the function. would it be appropriate to use getScript() in a callback to attach the correct handlers to the page being loaded?
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: jquery question
eh answered my own question
thanks!
thanks!