简体   繁体   中英

3 Errors in jquery-1.6.1-vsdoc.js when using in Visual Studio 2008

I'm using Visual Studio 2008 SP1 with KB958502 (.vsdoc hotfix). This allows us to use IntelliSense to auto-complete JavaScript.

When I use the jquery-1.6.1-vsdoc , there are three errors:

  1. Error updating JScript IntelliSense: jquery-1.6.1-vsdoc.js: 'rootjQuery' is undefined @ 66:2

  2. Expected expression @ 1505:16

  3. Expected expression @ 2649:15

For #3, Line 2649 is "checkClone": , and simply needs a true or false to be assigned.

For #2, Line 1505 is "triggered": }; and simply needs to be changed to "triggered": {} };

Where I'm getting stuck, though, is #1. Line 66 is a comment line, so most likely it's referring to Line67 which is return new jQuery.fn.init( selector, context, rootjQuery );

Anyone know how to fix this? Why would MS put something out that has 3 errors right off the bat? Surely, they test this before putting it out there.

I´ve been searching for an answer to VS2008 intellisense, and I've found the solution...

Add the next at line 67: rootjQuery = jQuery(document);

And that make the intellisense of VS2008 works.

By the time I don't know if that is the best solution but it works. :P

Best regards.

Apolo!

If you want to use jquery intellisense support you can use jquery 1.4.1 and jquery 1.4.1.vsdoc . It is tested in VS2008

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM