$('div').click(function(){
    alert(this.id);
});

On Apr 10, 8:46 pm, thought <thou...@orcon.net.nz> wrote:
> Hi all.
> This might be more of a javascript problem rather than a jquery
> problem,
> but I'm also wondering if there is a 'jquery way' of solving it.
>
> Given this code:
>
> <DIV id="div_one"></DIV>
> <DIV id="div_two"></DIV>
> <DIV id="div_three"></DIV>
> <DIV id="div_four"></DIV>
>
> Lets say that the user is invited to click one one of these divs.
>
> How do I get the id of the div that was clicked ?
>
> Thanks.

Reply via email to