Enabling jQuery Intellisense inside JavaScript file in Webmatrix

牧云@^-^@ 提交于 2019-11-30 08:50:48

问题


I have done the following in WebMatrix.

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>

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


回答1:


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" />

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

http://yadi.sk/d/Szhp8tOJNLXYu



来源:https://stackoverflow.com/questions/23284993/enabling-jquery-intellisense-inside-javascript-file-in-webmatrix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!