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
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">
>
>
>
>
>
>
>
> $(
http://www.w3.org/
TR/html4/strict.dtd">
$(function(){
$("td a.menu:contains('Main')").click();
});
Main
On Aug 13, 6
$("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
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
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
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
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
+
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
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
10 matches
Mail list logo