Two months ago, Microsoft announced that it would add support for the open-source jquery JavaScript library in Visual Studio. Now Microsoft has completed this project, you can use jquery in Visual Studio 2008 and Visual Web Developer Express, a free software development tool.
Jquery is an excellent lightweight JavaScript Library (15 kb) that is compatible with css3 and various browsers (IE 6.0 +, FF 1.5 +, opera 9.0 +, and Safari 2.0 + ), jquery allows you to easily process Dom and events, implement animation effects, and provide Ajax interaction for websites. Jquery can keep your HTML pagesCodeSeparate from HTML content. That is to say, you don't need to insert a bunch of Javascript in HTML to call the command. You just need to define the ID.
Now you can download the support for jquery intelliisense annotations for free from the Internet. The following describes how to enable jquery intelliisense in Visual Studio 2008:
First, install Visual Studio 2008 SP1;
Secondly, install Visual Studio 2008 patch kb958502, which was released by Microsoft before. It will check whether there is an optional file "-vsdoc When Visual Studio references the Javascript library. JS ", if it exists, it will drive the Javascript intelliisense engine;
Finally, download the jQuery-vsdoc.jx file. You can download the jquery and jquery-vsdoc files from the jquery.com download page:
Save the jquery-vsdoc.js to the directory where the jquery. js file is located in the project (and make sure that its naming prefix matches the jquery file name ):
Then you can use an HTML <script/> element to reference the standard jquery file:
You can also use the <asp: scriptmanager/> Control to reference it, or add a // <reference/> comment on the top of a separate. js file.