Reputation: 52716
I have a HTML block
<a class="active" href="#mobileOrder">
I am using jQuery 2.1.1
. When I click the above block, I want call JavaScript
function move(){...}
How to do this?
Upvotes: 0
Views: 1057
Reputation: 206618
Simply do like:
$("a.active[href='#mobileOrder']").on("click", move);
https://api.jquery.com/attribute-equals-selector/
Upvotes: 3