[jQuery] Re: .click() not working on page loaded with .load()

2007-06-28 Thread Krafton
Hello, Foloowing your advices, my code looks so now : $(document).ready(function() { clicks(); } ); function clicks() { clicks(); } I will try to bind just new loaded links instead of bind the whole three each time it loads. Tha

[jQuery] Re: .click() not working on page loaded with .load()

2007-06-25 Thread Dan G. Switzer, II
Krafton, >That's exatcly my problem, following your advice, this is my new >code : > >$(document).ready(function() > { > $("a").bind("click",function() > { >var link=$(this).attr("id"); >$("#primaryContentContainer").load("pages/"+l

[jQuery] Re: .click() not working on page loaded with .load()

2007-06-25 Thread Krafton
Thanks Dans, That's exatcly my problem, following your advice, this is my new code : $(document).ready(function() { $("a").bind("click",function() { var link=$(this).attr("id"); $("#primaryContentContainer").load("pages/"+link +

[jQuery] Re: .click() not working on page loaded with .load()

2007-06-25 Thread Karl Swedberg
Hi Krafton, In addition to Dan's excellent reply, I'd like to suggest a couple good resources: Brandon Aaron has written a plugin to help with binding events to elements after they're inserted into the DOM: http://dev.jquery.com/browser/trunk/plugins/behavior Also, this tutorial d

[jQuery] Re: .click() not working on page loaded with .load()

2007-06-25 Thread Dan G. Switzer, II
Krafton, >I'm using this code in jquery to load the content of a div >(primaryContentContainer) by cliking on >$(document).ready(function() > { > $("a").click(function() > { >var link=$(this).attr("id"); >$("#primaryContentContain