There is a script which named Normal.js in the HTML:
$(function () {
function WhiteNav() {
$("#LOGO>img").attr('src', '/images/LOGOWhite.svg');
$("#NavUL a").css("color", "#cecece");
}
});
And here is the struct of the HTML as below:
However, after the browser(Chrome) ran the WhiteNav function in the script, it reported this error and the WhiteNav failed:
Why it turned out to be this? It seems like I ran the code with a different file, is it right? I tried the way as Why jQuery click doesn't work when included in a separate file said but failed again.
What's wrong with this? How can I solve this problem? Would you please help me? Thank you.