Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery call function if object with specific class clicked?

Tags:

jquery

class

I have an unordered list with some links. Some links have a class "A" others have a class "B". I'd like to call a jQuery function depending on which class is clicked, but I don't know how to do this.

like image 437
Raoul Avatar asked May 10 '11 14:05

Raoul


1 Answers

$('.yourClass').click(function(e){
    //do something here
});
like image 109
ave4496 Avatar answered Nov 15 '22 07:11

ave4496