jquery - Select correct button when two buttons share the same class -


i have following html:

<a class="action_btn recommend_btn" act="recommend" href="recommend.php">     recommend </a> 

and jquery is:

$(".action_btn").click(function() {  }); 

the problem have

<a class="save action_btn" onclick="return false;">     save </a> 

but don't want button trigger click function.

how can this?

can't use other selector?

$(".recommend_btn").click(function() { /* code */}); 

or filter second 1 out (if want trigger function on .action_btn elements, not .save elements:

$(".action_btn").not(".save").click(function() { /* code */}); 

Comments