Search code examples
javascriptjqueryintellisensewebmatrix

Enabling jQuery Intellisense inside JavaScript file in Webmatrix


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?


Solution

  • 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 example