开发者

vs10 intellisense for jQuery

I'm not able to get intellisense to work with JavaScript/jQuery code in vs10. Not even getting highlighted opening/closing bracket and parens, much less autocomplete.

In VS08 we had to install a patch to get intellisense for jquery. VS10 doesn't need that patch to support -vsdoc files. There was a bug in 08's intellisense that, if any of a project's included .js files had an error, we'd lose intellisense for 开发者_JAVA技巧JavaScript. That was supposed to be fixed in vs10.

What the current set of troubleshooting steps to enable intellisense for VS10?


In a .js file just drag in the jquery-x.x.x-vsdoc.js file from JQuery to get the intellisense. It will add a

/// <reference path="jquery-1.4.1-vsdoc.js" />

tag and enables intellisense.

For inline javascript you can use the same technique, however it generates an javascript include tag like:

<script src="Scripts/jquery-1.4.1-vsdoc.js"type="text/javascript"></script>

After that, the intellisense should work

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜