Errors in included jquery library files
In Visual Studio MVC projects they have a way to attach scripts using wildcards to attach all something like all the scripts that begin with "jquery". There is also a way to exclude files from your project so that they are not considered when the project is run or deployed. A couple of months ago to address so other issues I updated my jquery files from the default included 1.8.2 to the latest I could find 1.11.1. I excluded the 1.8.2 files thinking that they would not be included in my project. While trying to troubleshoot so other issues I noted that despite my intentions, that the 1.8.2 files were still being added and they were being linked
after the 1.11.1 files. So instead of excluding them from the project I deleted them altogether. Sure enough the 1.8.2 files no longer appeared on the pages. But then when I started to run the project, It bombs on line 2571 of the jquery1.11.1 file which reads
Copy code
-
return div1.compareDocumentPosition( document.createElement( "div" ) ) & 1;
with the error:
Copy code
- 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'compareDocumentPosition'
Adding the 1.8.2 files back into the project did not change this.
Since the only change I made was with which jquery files were included it seems like this is a JQuery issue.
Then I rebuilt the project from a prior version which included both jquery libraries which would then build without any issues.
Now I noted that one of my simpler jquery functions just stopped working. It actually would lock up the browser. I checked the output of the run of my project and I noted that suddenly I am getting the below errors.
- Exception was thrown at line 1253, column 4 in https://localhost:44306/Scripts/jquery-1.11.1.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 1271, column 4 in https://localhost:44306/Scripts/jquery-1.11.1.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 5288, column 6 in https://localhost:44306/Scripts/jquery-1.8.2.js
0x800a139e - JavaScript runtime error: SyntaxError
Exception was thrown at line 5263, column 7 in https://localhost:44306/Scripts/jquery-1.8.2.js
0x800a139e - JavaScript runtime error: SyntaxError
I have no idea what is causing this, but I do note that once again the inclusion of both jquery libraries seems to be causing an issue.
Has anyone seen anything like and know what to do about it? It would seem the obvious answer would be to delete the older jquery version, but one sees what happened last time I did that. What about listing the newer jquery version after the other one?