[jQuery] $('a')[0].click() not working?
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="<a href="http://jquery.com">http://jquery.com</a>">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
discuss@jquery.com
http://jquery.com/discuss/