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. In this case
you can fake it with this:

$("table.vacatures tbody tr").click(function(){
   window.location = $(this).find("a:first")[0].href;
});

(no need for one() as you're leaving the current page anyway)

On Jan 19, 4:13 pm, Joe <joseph.is...@gmail.com> wrote:
> What is a "one" event?
>
> On Jan 19, 6:48 am, mmvdl <mm...@yahoo.co.uk> wrote:
>
> > Within a <table> each first <td> of every row has an <a> tag.
> > But I want the whole <tr> to be clickable.
>
> > To avoid recursion I've put a .one() event on the <tr> like so:
>
> > $("table.vacatures tbody tr").one("click", function(){
> >    $(this).find("a:first").click();
>
> > });
>
> > But the click on the <a> tag will not fire. Why?

Reply via email to