benhowdle89 benhowdle89 - 3 months ago 11
jQuery Question

jQuery find ID of clicked button by class

I have numerous buttons on my page with the same class names. However these buttons have different ID's. How do i do this:

var id = $(this).{ID OF CLICKED BUTTON};

How can i make this pseudo code work?


     var id =;

The ID is accessible directly from the element. There's absolutely no need to use a jQuery method.