MVC3 Razor – jQuery – Visual Studio != Intellisense

I wondered where my intellisense had gone for jQuery with MVC3 and Razor. Anyway there is a fix for it:

Add the following to your view (with the jQuery vsdoc version you have:

@if (false) { <script src="~/Scripts/jquery-1.5.0-vsdoc.js" type="text/javascript"></script> }

The if-statement prevents the script tag from being rendered into the html source code.

Grab jQuery 1.5.0 vsdoc from here -> http://damianedwards.com/files/jquery/jquery-1.5-vsdoc.js

jQuery vScroll v1.2.0 released – multiple instance support + cycle feature

jQuery vScroll v1.2.0 released:

  • Includes support for multiple instances on a page.
  • Passing in of height atttribute for container.
  • Cycle feature to return to first item when last item reached.

Plugin Page Link

Download here: http://plugins.jquery.com/content/vscroll-120

Demo here: http://simon.tpdserver2.co.uk/jquery/vscroll/demo/

!Important: If moving from a previous version to v1.2.0 you must pass in the height you want the container to be as a plugin option.

jQuery divGrow plugin updated – 1.3.0

Plugin has been updated. No longer need to provide the final height value using the rel= attribute, it is calculated. Also now generates W3C valid markup.

You can also specify whether or not to show the brackets (“[…]”) before the ‘more’ button using the option ‘showBrackets’.

Download from here -> http://plugins.jquery.com/content/divgrow-130

Plugin page – http://simonhibbard.wordpress.com/2010/06/02/jquery-based-div-grow-shrink/

Using jQuery .animate() to spice up a simple page

Here is an example of using jQuery .animate to add a bit of interest to otherwise basic pages on this site -> http://www.acplanningsolutions.co.uk/case-studies.aspx

One effect is used to fade in/out the background colours of the menu items creating a nice ‘trailing’ effect as you hover over them (see below).

The other effect is to animate in the images and text, also if you click on “Conservation Area – Residential” you will notice the page frame grows to fit the new image and the images change on a timer.

Just thought I would share this as an example of what can be done with a small amount of jQuery code :)