13 Nov, 2008
jQuery intellisense in Visual Studio 2008 & Dreamweaver
It has rapidly gained popularity with web developers and designers – now software manufacturers are starting to take note with industry leaders like Adobe & Microsoft adding tools to their web development environments to help make jQuery development even quicker.
Microsoft Visual Studio 2008
I spoke previously about getting Jquery intellisense in Visual Studio 2008. Since then Scott Guthrie announced that
that Microsoft will be shipping jQuery with Visual Studio going forward and then just yesterday I spotted this article on the Visual Web Developer Team Blog with interesting updates to VS2008′s jQuery intellisense. The best development from my point of view is the ability to get code hints in your aspx & master pages, not just your .js files.
Next download the jQuery IntelliSense documentation file and save it in to your website in (probably a good idea to put it in the same folder as your jQuery file).
/// <reference path="jquery-1.2.6-vsdoc.js"/>
To add it to aspx & master pages do add the following lines to the head of your document.
Points to note:
- If you are using aspnet’s MVC framework you need to ensure that your path to the reference file starts with a tilde otherwise VS will not find the reference file.
- dding a link to the reference to a master page means all aspx pages that inherit that master page will have intellisense enabled.
This seems to work pretty well, and even handles chaining. However, I do have a couple of minor gripes. Firstly as soon as I typed “$(” dreamweaver told me I had a syntax error which really confused me, in the end I realised that just had to keep typing and DW would eventually figure out what I was doing. The other thing is, as a VS user I’m used to to code hits appearing strait away, in DW you have to press Ctrl + [space]. It’s not a big deal but would take some getting used to.