Sunday, September 28, 2008

[jQuery] Re: click function

For some reason though it doesn't even do the first console.log....

$(".status_actions img").click(function(){
console.log("clicked!");
});

nor will it do alert or anything else...

On Sep 28, 1:42 pm, BB <buchholz.bast...@googlemail.com> wrote:
> You don't need .val() just: $(this).attr("alt")
> Please write some more code, because at the moment I think it is all
> right.
>
> On 28 Sep., 17:21, SeanJA <sean.sa...@gmail.com> wrote:
>
> > $(".status_actions img").click(function(){
> >         console.log("clicked!");
> >         console.log($(this).attr("alt").val());
>
> > });
>
> > It puzzles me as to why this does not work...

No comments: