logo       

Re: [jQuery] The index of an element with Event: msg#01157

lang.javascript.jquery

Subject: Re: [jQuery] The index of an element with Event

Sam Collett a écrit :
> You can workaround this though usign each:
>
> $("a").each(
> function(i)
> {
> $(this).click(
> function(e)
> {
> e.preventDefault();
> alert("item " + i + " clicked with href = " + this.href);
> }
> )
> }
> );
>
>
Thanks, it's perfectly fine for me :)


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise