First I would get this error:
Error updating JScript IntelliSense: D:\Source\...\JS\jquery\jquery-1.3.2.js: Object doesn't support this property or method @ 18:9345
The first problem is that the file which has the enhanced comments for intellisense is named jquery-1.3.2-vsdoc2.js. Visual Studio is looking for a *vsdoc.js. Make sure you rename the file to jquery-1.3.2-vsdoc.js.
After renaming the file I was greated with this lovely error:
Error updating JScript IntelliSense: D:\Source\...\JS\jquery\jquery-1.3.2-vsdoc.js: 'div.childNodes' is null or not an object @ 1487:1
My understanding is that the code inside the methods doesn't really matter (Assuming it's not changing the object definitions of course). Since this code will never be ran, I simply removed line 1488 which looks like:
elem = jQuery.makeArray(div.childNodes);
And now we have intellisense working with jquery 1.3.2
Edit
I've noticed a lot of traffic recently on this post, if this post has helped resolve your issue (or not helped) leave a comment let others know.
Thank you and good luck
-jb
12 comments:
This resolved my issue - thank you!
Awsome thanks for letting me know!
The filename issue resolved my problem, after restarting VS.
Thanks!
@Mike,
Interesting, I'm preety sure I tried restarting VS but can't remember now. I was very apprehensive about removing stuff from the js file.
nt. I'd seen a lot of posts but this one worked perfectly for me on Visual Web Developer 2008 sp1
Cheers
Thanks, this helped me out a lot!
Also be aware that you should add the main javascript file to your page to get intellisence. Adding ".min" or ".pack" versions of jQuery causes the same problem too!
I got intellisense on my aspx page but how do I get it in my .js page?
Josh, thanks very much for this solution. Removing the "2" from the -vsdoc name fixed my problem.
Previous Poster, to get the intellisense working in your .js files, you will need to add a reference tag such as '/// <reference path="../../js/jquery-1.3.2.min.js" />' (without the single quotes). You can simply drag the file from the Solution Explorer in to the code in your .js file and it Visual Studio will automatically create the tag for you.
Sweet...Thanks!
Thanks man this really helped me, you are a really smart guy. I just would have never thought of it.
This most definitely worked for me. Great Article.
Post a Comment