I'm trying to have a jquery function run if the url is on a couple distinct paths, particularly the index and the root. Right now, I have
"if (top.location.pathname === '/','index.html')
{
function happens
}
It works if I have only one pathname at the top but I don't know the syntax for having two. I'm also likely going to do something with the opposite, like:
"if (!top.location.pathname === '/','index.html')
{
function happens
}
Couldn't find anywhere online that explained this! I'm mostly self taught so if this is simple to do go easy on me, lol.
Aucun commentaire:
Enregistrer un commentaire