简体   繁体   English

在Visual Studio 2008中使用jquery-1.6.1-vsdoc.js时出现3个错误

[英]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). 我正在将Visual Studio 2008 SP1与KB958502(.vsdoc修补程序)一起使用。 This allows us to use IntelliSense to auto-complete JavaScript. 这使我们可以使用IntelliSense自动完成JavaScript。

When I use the jquery-1.6.1-vsdoc , there are three errors: 当我使用jquery-1.6.1-vsdoc时 ,出现三个错误:

  1. Error updating JScript IntelliSense: jquery-1.6.1-vsdoc.js: 'rootjQuery' is undefined @ 66:2 更新JScript IntelliSense时出错:jquery-1.6.1-vsdoc.js:'rootjQuery'未定义@ 66:2

  2. Expected expression @ 1505:16 预期的表达@ 1505:16

  3. Expected expression @ 2649:15 预期的表达@ 2649:15

For #3, Line 2649 is "checkClone": , and simply needs a true or false to be assigned. 对于#3,第2649行是"checkClone": ,只需要分配true或false即可。

For #2, Line 1505 is "triggered": }; 对于#2,行1505被"triggered": }; and simply needs to be changed to "triggered": {} }; 并且只需将其更改为"triggered": {} };

Where I'm getting stuck, though, is #1. 不过,我陷入困境的地方是#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 ); 66行是注释行,因此很可能是指Line67,它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? MS为什么会马上提出带有3个错误的内容? 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... 我一直在寻找VS2008 intellisense的答案,并且找到了解决方案...

Add the next at line 67: rootjQuery = jQuery(document); 在第67行添加下一个: rootjQuery = jQuery(document);

And that make the intellisense of VS2008 works. 而这使得VS2008的智能感知得以实现。

By the time I don't know if that is the best solution but it works. 到那时,我还不知道这是否是最好的解决方案,但是它可行。 :P :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 . 如果要使用jquery intellisense support ,则可以使用jquery 1.4.1jquery 1.4.1.vsdoc It is tested in VS2008 在VS2008中经过测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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