[jQuery] Ajax - Help with events
Hey guys, I've read this and I'm still struggling.
<a href="http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F">http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F</a>
I have a table that sits inside a div with an id of events. And I have the following functions that work on the content that resides inside the table:
<u>Tooltip function</u>
$(document).ready(function(){$('.links2 a, .links2 a .linkbook, .links2 a .linkdownlo, a.thumbimg, #upcoming-link, #previous, #event-date-th a, #event-info a, #bet-info a, .event-info, #tab2 .title').tooltip({delay:0,showURL:false,positionLeft:true});});
<u>Cluetip function</u>
$(document).ready(function(){$('a.event-info').cluetip({waitImage:true,activation:'click',width:320,arrows:true,dropShadow:true,hoverIntent:false,sticky:true,mouseOutClose:false,closePosition:'title',closeText:'<img src="images/cross.png" alt="close">'});});
I don't think event delegation would work as a new table of contents is pulled in each time and the above functions targets items that are inside the table. I'm pulling in the new tables via .load().
Any advice / newb friendly guides would be much appreciated.
Thanks,
Will