Geeks With Blogs
Jakub Malinowski's blog The blog about ASP.NET
Hi!,
As all of you (I hope) I want to have something similar to Intellisense everywhere. So also I want it in JavaScript and particularly in jQuery. Yeah, yeah, I know, that we have Script# and even M$ uses it, but I want pure JS and pure jQuery. I become very as jQuery team brought us Visual Studio Documentation for jQuery. It is on their site in download section. Works very nice and start its help as soon as you start typing, $ goes first then identifier in brackets and after $("sth"). there is a beatiful list of functions to use. Documentation file is file with the same name as jQuery file, in the same folder, but it has "-vsdoc" interfix inside. More about it later.

And here is something more about jQuery in MVC (which I really love). I created new MVC application project and I'm gonna use jQuery in it.



For first, most sophisticated question for me was, why doesn't it bring jQuery intellisense support file, but it seems that this version of MVC was packed before this file was available. If you are lazy or like very comfartable support (like me), then here you are.

Ok, you say, but what when I want intellisense and I'm not able to add reference to jQuery (because e. g. I'm sitting in user control, and I'll place several controls of this kind on the page and I cannot reference jQuery hundred times). Workaround is simple:






<%if(false){ %>
<script language="javascript" src="Scripts/jquery-1.2.6.js" type="text/javascript" />
<% }  %>

if you put this on your page, you will have intellisense.

But remember! You reference jQuery file, then VS look for file with same name but with "-vsdoc" interfix. You don't reference file with "-vsdoc" in name, you just put it in folder where normal jQuery file is.

See you next post! Posted on Tuesday, December 2, 2008 8:58 PM JavaScript | Back to top


Comments on this post: Intellisense support for Jquery (in Visual Studio)

Comments are closed.
Comments have been closed on this topic.
Copyright © jakubmal | Powered by: GeeksWithBlogs.net