I am including jQuery in the head of a private site. I also included an external JS file which then uses jQuery.
& lt; Script language = "javascript" src = "../ss / jquery-1.4.2.min.js" & gt; & Lt; / Script & gt; & Lt; Script language = "javascript" src = "../ss/ global.js" & gt; & Lt; / Script & gt; The global.js only contain the following:
$ (".nav-item"). Hover (function {$ (this) AddClass ("selected");}, function () {$ (this) .removeClass ("selected");}); When I tried it out, I was seeing that my error console was giving me "$ defining error" after carrying my external js file down to the page Everything works fine, apparently what is the right way to deal with what is the issue of a time?
Thanks in advance for any help
EDIT: It seems that when I saw an undefined error last night I would have to do something to get rid of it and I now have to do it View or Reproduce I tried to force the events into the document. Already, and it seems to solve my problem.
Did you bind document to global documents to prepare the document? In JS?
Comments
Post a Comment