I have an if statement to generate active classes, it works in most cases but I have an admin section where you can access the front-end products but the URL changes to use query strings to get the correct page.
For this reason, I am trying to create an if statement to say, if VariableHREF contains variableQueryString then do something...
if(variableHREF contains variableQueryString ){
$(this).closest('li').addClass('active');
}
I have that at the minute but it gives me a syntax error.
Aucun commentaire:
Enregistrer un commentaire