I want to introduce you some cool thing – jQuery Intellisense in Visual Studio 2008.
jQuery makes JavaScript code easier and quicker to write. The library provides helper functions that dramatically increase your productivity while decreasing your frustration.
Every day I find more and more web sites which use jQuery. jQuery is faster and it saves a dozens of lines of code but with this shorter code was come the problems.
When I started to wrote jQuery code I found that I don’t remember all selectors or functions which are available in jQuery. In the beginning I wrote code with open jQuery's web site documentation. But in this way I spent too much time to search the selector or function. I needed the faster way to wrote jQuery code. And I’ve found it ! Jquery Intellisense!
jQuery intellisense will fully integrate with Visual Studio 2010 but if you still using Visual Studio 2008 you should do the next steps to get jQuery intellisense.
1. Install Visual Studio 2008 SP1 – You can found it here
2. Install VS 2008 Patch KB958502 – It allow you VS to support “-vsdoc.js” IntelliSense doc. files
3. Download the jQuery-vsdoc.js file - You can download both the current jQuery release and jQuery –vsdoc.js here
Important: After downloading jQuery and jQuery –vsdoc.js you need to place them in the same directory in your project.
You can then reference the jquery files with an "script" tag:
<script src="jquery-1.3.2.js" type="text/javascript"></script> <script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>After all these steps you will have jQuery intellisense in your VS.
If you want to have jQuery and jQuery intellisense in user control you need to add this block:
<% if (false) { %> <script src="jquery-1.3.2.js" type="text/javascript"></script> <% } %>
Now you can have fun with jQuery without check every minute online documentation when you writing something on jQuery.