Looks like it's not quite in the right place. Try changing
Code:
});
$("*").find("a[href='"+window.location.href+"']").each(function(){
$(this).addClass("submenuactive")
//add your own logic here if needed
})
to
Code:
$("*").find("a[href='"+window.location.href+"']").each(function(){
$(this).addClass("submenuactive")
//add your own logic here if needed
});
})
I'm experimenting around a bit, but at the moment, you've moved the code into a new file, but it doesn't look like it's inside the document ready code, but outside it.
EDIT: Actually, you maybe just left out the final
});
in your code, so rather than move anything, just add and extra
Code:
$("*").find("a[href='"+window.location.href+"']").each(function(){
$(this).addClass("submenuactive")
//add your own logic here if needed
});
})
and don't actually move anything. (As I say, this isn't my area.)
Bookmarks