在Webmatrix中的JavaScript文件中启用jQuery Intellisense

问题描述:

我在WebMatrix中完成了以下操作。

I have done the following in WebMatrix.

我在HTML页面中导入了jQuery,其中包含jQuery文档,并在HTML script tag。

I imported jQuery inside my HTML page with documentation of jQuery and successfully enabled jQuery intellisense inside the HTML script tag.

 <script type="text/javascript"  src="JS/jquery-2.1.0.js" ></script>
 <script type="text/javascript"  src="JS/jquery-2.1.0-vsdoc.js" ></script>

现在我想在我的外部JavaScript文件中启用jQuery intellisense,它会如何工作?

Now I want to enable jQuery intellisense inside my external JavaScript file,How would it work?

通常,在Visual Studio中,您可以在文件开头使用 reference 指令。它将在当前脚本文件的脚本上下文中包含一个脚本文件。并且将启用IntelliSense。既然WebMatrix也是微软的,我相信这也应该有效:

Usually, in Visual Studio you can use reference directive in the beginning of the file. It will include a script file in the scripting context of the current script file. And IntelliSense will be enabled. Since WebMatrix is microsoft as well, I believe this should work too:

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

如果路径属性不起作用,请尝试文件 attribute。

if path attribute won't work, try file attribute.

http://yadi.sk / d / Szhp8tOJNLXYu
example

http://yadi.sk/d/Szhp8tOJNLXYu