The followingcode will fire alert to the click event for elements with Class = a.cssPauseAll OR attribute = historyID
$(document).on("click","a.cssPauseAll,[historyID]", function () {
alert($(this));
});
How can I use multiple selectors using an AND operator?
which means, the elements with the a.cssPauseAll class AND historyID attribute?
Just remove the
,from your selector:historyIDis not a valid attribute you can usedata-*attribute instead: