I'm embarassed to post this, but is the click() method not supported for
links to trigger them?

I have a div that has a link inside of it that I want to trigger as if
someone clicked that link when they click the div.

<div id="foo">
<a href="http://jquery.com";>MyLink</a>
</div>

$('#foo').bind('click', function(){
    // Works in IE, not Firefox
    $('> a', this)[0].click();
    // I've also tried
    $('> a', this).trigger('click');
});

Does the click method just not work like I am expecting it to?

-js
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to