I would like to have an array of classes/IDs and then on a click function using jQuery pass each of those values to that function to exclude them from the event rather than have numerous :not
calls as I currently have which works but is a bit ugly to me.
var excludes = [
'#seeMore',
'#readMore',
'#isiToTop',
'.btn-cta--download',
'.videoModalTrigger',
];
$(
"a[href]:not('#seeMore'):not('#readMore'):not('#isiToTop'):not('.btn-cta--download'):not('.videoModalTrigger')"
).click(function () {
_siteNs.Utils.deleteCookie('5_Signs');
});
CodePudding user response:
$("a[href]").not(excludes.join())