My code is like this
$("a[href]").each(function () {
if ($(this).attr("href").toLowerCase().indexOf("javascript:") != 0 && $(this).attr("class") != "to-top")
{
$(this).attr("href", new URI($(this).attr("href")).removeQuery("at").addQuery("at", $.cookies.get('ACCT_TYPE') != null ? $.cookies.get('ACCT_TYPE') : "erhverv"));
}
});
now i want to avoid a specific link from this condition .”a” links comes ‘under tax-switch’ class. is there any short cuts to achieve this?
As @vivek has said, use the
notfunction:This’ll select all anchors that do not have the class ‘tax-switch’.