Thanks, It solved my problem, But I have another small one:
The thing is, I made a function called load() that loads the result of a php file into a div. When done it calls a function called all_js() that contains all the js (all the events that didn't work previously etc.). The problem is that I need to call load() inside the all_js() function in a situation like this: $.get("operator.php",{ new_item: id },function (){ proccessing(0); load(); }); But it doesn't seem to work :( I should probably make load() global or something so it will be accessible from such places. How would I do that? Thanks again, Leon. sawmac wrote: > > > > On Dec 17, 2007, at 11:56 AM, LeonL wrote: > >> >> >> Hi everyone, >> >> I have an event that is not being listened and I can't figure out why. >> >> The thing is that everything is working fine while all my html code is >> static, but as soon as I modified it with some data pulled from the >> db, the >> click() events doesn't trigger the actions any more. > > Hi Leon, > > This is question comes up a lot. Basically, you've added listeners for > the click event THEN updated the DOM. You need to either reapply the > click event AFTER the Ajax call or use the LiveQuery plugin: > > http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F > > --dave > > -- View this message in context: http://www.nabble.com/Events-don%27t-work-after-load-content-using-%24.get-tp14374018s27240p14397188.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.