Reputation: 1855
I downloaded jquery-1.7.1.min.js
and jquery-1.7.1-vsdoc.js
.
I am working with VS2008.
I included those .js files into my file. but while using jquery intellisense is not coming.
How to do that.I read the web site jquery intellisense. Even though i did like this i am not getting the intellisense. whats wrong in there. Please help me. I included in my file like this
<script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>.
<script type="text/javascript" src="scripts/jquery-1.7.1-vsdoc.js"></script>
Thanks,
Upvotes: 1
Views: 3057
Reputation: 1
In my experience, Visual Studio 2008 cannot cope with the .min.js editions of jQuery 1.7.x. Try to use the development versions (without the ".min" in their names). With them, IntelliSense does work. Just verified with jQuery-1.7.1.js and jQuery 1.7.1.min.js. In order to use the vsdoc files all you need to do is to have the vsdoc file in the same folder as the .js file, no need to include it (if your Visual Studio 2008 is up to date).
Upvotes: 0
Reputation: 18260
Have you checked the following statement on the Scottgu's blog...
VS 2008 SP1 adds richer JavaScript intellisense support to Visual Studio, and adds code completion support for a broad range of JavaScript libraries.
The jQuery intellisense annotation support will work great with VS 2008 SP1.
First you need correct patch KB958502 - JScript Editor support for “-vsdoc.js” IntelliSense doc. files. Install it and use as:
my script tag said
<script type="text/javascript" source="Scripts/jquery-x.js"></script>
then follow these reference links:
jquery + intellisense + vs2008 pro fails to load
Jquery and Intellisense in VS 2008 with hotfix and SP1
jQuery Intellisense in VS 2008
jQuery and Microsoft
JQuery IntelliSense in Visual Studio 2008
Upvotes: 1
Reputation: 79069
To detect the file as an intellisense, you need to have at least SP1 of Visual Studio 2008 and Visual Studio 2008 Express. You can find it here
As per a blog post. You should do something like this
<script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>.
<% if(false) { %>
<script type="text/javascript" src="scripts/jquery-1.7.1-vsdoc.js"></script>
<% } %>
Upvotes: 1
Reputation: 340
you need to drop the intellisense file on the page you are working on i.e. add reference to the intellisense file. this only provides the intellisense in the IDE and has no effect on the execution of the page!
However, before publishing to production you should remove it's reference to avoid unnecessarily heavy page!
Upvotes: 0