[jQuery] Re: Using jQuery on imported content

2008-07-14 Thread Hamish Campbell
Are you attaching the click handlers before or after you load the ajax content? If you're trying to apply the click handler before, it won't work because the anchors don't exist yet. Either apply the click handler after the content is loaded, or use a plugin like LiveQuery to handle updates for

[jQuery] Re: Using jQuery on imported content

2008-07-14 Thread Pete
I want the index page to manage the links on the page that's loaded into the div via ajax. So in the index page, I'll try to attach the click event handler like : $('a#myanchor').click(function(){//dosomething}); in the imported page, the anchor looks like: link On Mon, Jul 14, 2008 at 2:36 PM

[jQuery] Re: Using jQuery on imported content

2008-07-14 Thread Brian J. Fink
What syntax are you using for the anchors themselves? On Jul 14, 2:00 pm, Peter Benoit <[EMAIL PROTECTED]> wrote: > Hi all, > > I have an "index" page with a div, that I $ > ('#mydiv").load('mypage.html') into. > > The problem I'm having is, I have anchors on "mypage" that I would > like to effec