You need to ensure you are using the document ready function. If you don't put it within that it won't fire when loading the way you are. The document ready function is detailed on the jquery site and fires before the content loads. I can't surf the web at the moment to get you the link sorry.
-----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of cz231 Sent: Tuesday, August 11, 2009 3:28 PM To: jQuery (English) Subject: [jQuery] Re: jQuery not working with content that is loaded in. Thanks I think that that is my issue. Is there a way to rebind my whole javascript file? Or will that affect performance a lot? I ask because I want pretty much all of my js file pertains to the new content I'm loading in. On Aug 11, 1:17 pm, Shane Riley <shanerileydoti...@gmail.com> wrote: > If you're using the latest jQuery, you can bind most events with .live > () to ensure that your events are attached when the new content is > loaded in. Note that this doesn't work for all events, though. > > On Aug 11, 12:03 pm, cz231 <cz2...@gmail.com> wrote: > > > Hi, > > > I'm building an online application, and I want one widget to refresh > > every time a user clicks a certain element. So I wrote a jQuery on > > click listener that initializes the function to reload the widget. > > However, when the widget is reloaded, all of the javascript effects > > stop working for that widget only. It's like I disabled javascript for > > that part of the page only. Javascript still works everywhere else. > > > Can any of you jQuery gurus think of a reason why? (preferably one > > with an easy fix :P)