Thanks.

On Jul 23, 12:18 pm, Dhruva Sagar <dhruva.sa...@gmail.com> wrote:
> Inside the click event handler, the id's should be available using
> this.idor $(this).attr('id')
> Thanks & Regards,
> Dhruva Sagar.
>
> Pablo Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html>
> - "Computers are useless. They can only give you answers."
>
> On Thu, Jul 23, 2009 at 4:44 PM, shaf <shaolinfin...@gmail.com> wrote:
>
> > Hi Guys
>
> > i have a click event on my links. Each link has an ID. Is there any
> > way I can get the link ID when the user clicks it ? See below for
> > code:
>
> > <a id="menu_home" href="#Home"></a>
> > <a id="menu_contact" href="#Contact"></a>
>
> > //JS
> > $(document).ready(function() {
> >        // Add menu event listeners
> >        var menuItems = ["home", "contact"];
> >        $.each(menuItems, function(intIndex, nm) {
> >                $("#menu_"+nm).click(function () {
> >                        getPage(nm+".htm");
> >                });
> >        });
>
> > });

Reply via email to