[jQuery] Re: Click() Not Working

2009-08-14 Thread James
Just to clarify that further, click() on a doesn't perform a mouse click on a link and follow through. It calls the onclick event attached to the elements, which you don't have set, so it does nothing. On Aug 14, 4:08 pm, "Richard D. Worth" wrote: > It doesn't work to call .click() on an A, i

[jQuery] Re: Click() Not Working

2009-08-14 Thread Richard D. Worth
It doesn't work to call .click() on an A, if you want to navigate a link's href. Instead: window.location = $("td a.menu:contains('Main')").attr('href'); - Richard On Fri, Aug 14, 2009 at 7:32 PM, S2 wrote: > > http://www.w3.org/ > TR/html4/strict.dtd"> > > > > > > > > $(

[jQuery] Re: Click() Not Working

2009-08-14 Thread S2
http://www.w3.org/ TR/html4/strict.dtd"> $(function(){ $("td a.menu:contains('Main')").click(); }); Main On Aug 13, 6

[jQuery] Re: Click() Not Working

2009-08-13 Thread Jules
$("td a.menu:contains('Main')").click() should work. Can you post the html? On Aug 14, 4:48 am, S2 wrote: > This doesn't work in IE or Firefox: > > $("td a.menu:contains('Main')").click(); > > This works in IE: > > $("td a.menu:contains('Main')")[0].click(); > > $("td a.menu:contains('Main')").l

[jQuery] Re: .click() not working in ie6... 'g' is null or not an object

2007-09-24 Thread Erik Beeson
hover expects 2 functions, so getting an error isn't surprising. After a cursory look at your code, one thing that jumps out is I suggest you don't do $('div#wrap').attr('class') == "xlarge". Instead, do: $('div#wrap').is(".xlarge"). Other than that, maybe verify that your selector is working rig

[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