I've been learning JQuery and I am writing my custom jquery codes in Custom.js file. Actually what I am trying to do is, activate intellisense for Jquery in visual studio but it's not working and I want intellisense to also work in custom.js file where actually I'm writing my custom logic and codes.
I thought it could be solved by reference jquery-1.3.2-vsdoc2.js in custom.js.
I've downloaded and installed update pack of jquery for visual studio 2008 on my computer.
So what should I do to activate intellisense.
Thanks in advance.
IntelliSense# Visual Studio Code's JavaScript IntelliSense provides intelligent code completion, parameter info, references search, and many other advanced language features.
You can write your JS in separate files, but when it comes to deploying, it's more efficient to minify them all into a single file. For each script you load in your browser, you make a round-trip to the server, so it makes sense to minimize those. Also, take a look at, for example, jquery source on github.
First, when using Visual Studio 2008, install hotfix KB958502. Second, download the vsdoc file to the same folder as the original jQuery.js file, and make sure that file names match, i.e. if original file name is jquery-1.3.2.js, then the vsdoc file should be named jquery-1.3.2-vsdoc.js (notice: not vsdoc2.js); if you're using the min version of the file, adjust the name accordingly. Third, do not include the vsdoc file in the project (it's enough for the file to be in the same folder). Finally, to enable IntelliSense in custom JavaScript files, add the following line at the top of the JavaScript file (enter the correct path):
/// <reference path="path-to-vsdoc-file" />
Bonus: To refresh JavaScript IntelliSense, press Ctrl+Shift+J.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With