in your ajax all you can have the following : $.ajax({ url:"b.html", cache:false, // cache or not async:true, // load asynchronously or not success:function(html) { // code here } });
On Thu, Jul 2, 2009 at 6:00 AM, Charlie <charlie...@gmail.com> wrote: > one more thing you might look at and maybe get clarification on > > empty() " Note that this function starting with 1.2.2 will also remove *all > event handlers and internally cached data*. > > http://docs.jquery.com/Manipulation/empty > > > Veeru wrote: > > Hi Charlie > I have checked the links you gave me, found some interesting stuff > like adding a .html("") before updating the ajax content; but in the > problem situation mentioned, they were only load html, but what if > there is js as well - like if any element has an onClick() event in > the html, and this content loads every now and then, does the event > keep binding and binding till it hogs memory? > > I can try to remoev all js and include in an external file and load it > before the ajax calls, but i am just afraid the js file might become > too big and get more complicated to handle. > > Thanks > Vru > > > > >