Thx for pointing that out, native events won't fire...check!
I got carried away thinking the native event was firing because when i
initialy used
$("table.vacatures tbody tr").click( function(){
$(this).find("a:first").click();
});
I got a 'too much recursion' error, thinking that the native
It's a helper method that only fires once, then is removed.
http://docs.jquery.com/Events/one#typedatafn
mmvdl, if you are expecting that your click() call will trigger the
default browser action (following the link), that won't happen. click
() only fires the listeners, not the native behaviour
What is a "one" event?
On Jan 19, 6:48 am, mmvdl wrote:
> Within a each first of every row has an tag.
> But I want the whole to be clickable.
>
> To avoid recursion I've put a .one() event on the like so:
>
> $("table.vacatures tbody tr").one("click", function(){
> $(this).find("a:first
cool. thanks.
On Sep 4, 3:03 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> yep. you got it. :)
>
> --Karl
>
>
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Sep 4, 2008, at 8:46 AM, byron wrote:
>
>
>
> > That worked well. Thank you.
>
> > So in pseudocode this ess
yep. you got it. :)
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Sep 4, 2008, at 8:46 AM, byron wrote:
That worked well. Thank you.
So in pseudocode this essentially says..
when document is ready:
bind the event 'click' to '#thelink'
invoke the
That worked well. Thank you.
So in pseudocode this essentially says..
when document is ready:
bind the event 'click' to '#thelink'
invoke the href when a 'click' occurs
trigger a 'click'
correct? This is more for my own understanding.
You can't trigger a link's default action with jQuery, but you can do
something like this:
$().ready(function() {
$('#thelink').bind('click', function() {
window.location = this.href;
return false;
}).trigger('click');
});
--Karl
Karl Swedberg
www.eng
7 matches
Mail list logo