I am working on a hybrid application using jQuery Mobile. The issue is I want to handle clicks to all anchor tags present in the application except data-rel back buttons.
Consider this code:
<a data-rel="back">leave me</a>
I cannot just select all a elements like so:
$("a").click(function(event) {
alert("whooi handled all anchors")
}
Anyone have a suggestion on how to achieve this?
What about using the Not Selector:
You could also use the Attribute Not Equal Selector:
Does this work for you?