Posts Tagged ‘Intellisense’

Intellisense for jQuery

I love jQeury. I’m a jQuery Fan !

Look at this example from the jQuery home page:


$("p.surprise").addClass("ohmy").show("slow");

That will get all the p elements with the class surprise, add the class “ohmy”, and then change the display to “block” with a slow animation. Go run it on the jQuery homepage.  Nice, eh?  The dollar function is magical.  You just give it a CSS selector, and it returns jQuery objects that you can do all kinds of cool things with.  Also, almost all the functions in the framework return this same jQuery object, so they are chainable like you see above.

Lance Fisher has made an update to jQuery for Intellisense in Visual Studio 2008

[ Click here to read about it and download jQuery with the Intellisense updates. ]

Popularity: 5% [?]

Share

Add Custom JavaScript Intellisense

If you reference an ASP.NET page that contains a scriptmanager in your js file like below you get intellisense for the entire Microsoft AJAX Library plus any additional scripts ref’d by the scriptmanager.  The easiest way to get the /// <reference/> entry in your js file is to drag n drop your .aspx page from solution explorer into  the contents of your js file.  VS magically adds the refJ

Since I tend to use stand-alone .js files I can just add this.

/// <reference name="MicrosoftAjax.debug.js" />

to my consuming page and intellisense is wired to my JavaScript code.

image001 

Popularity: 3% [?]

Share