![]() |
jQuery work with changed div
Hello everyone,
Using: FF: 3.5 jQuery: latest Is there a way to make jQuery use code that has been injected into a <div> element. This code works: Code:
....all the including of Jquery etc goes here...PHP Code:
Code:
....all the including of Jquery etc goes here...Thanks, questionable |
With the latest jQuery version there is a function called live() which you can use for this very purpose. Here's a similar thread on the subject:
http://codingforums.com/showthread.p...highlight=live |
I've had this happen. I think the workaround is to put the new click handler inside the json function so that the event is attached after the appropriate element is inserted.
Code:
$.getJSON(url, function(data) |
Quote:
|
Works Great!
Works Great!
|
| All times are GMT +1. The time now is 02:57 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.