IT:AD:JQuery

Source

Same basics as already defined in IT:AD:JScript:Include

  • Official JQuery Site: to get the latest version, or know what the latest version is for CND (see below) check here:
  • Or CDN:

Google CDN:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript" ></script>

Microsoft CDN:

 <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js" type="text/javascript" ></script>

From ASP.MVC, use ResolveClientUrl:

  `<script src="<%=this.ResolveClientUrl("~/client/scripts/jquery-ui-1.8.9.xact/js/jquery-1.4.4.min.js") %>" type="text/javascript" ></script>`

Syntax:

$(document).ready(function() {....} );

//shorthand:
$(function() {...});

You can traverse through a list response using the each method:

$('h2').each(function(index) {this.innerHtml="Section" + index;}

Navigation is a huge part of the Web Experience…and covers more than just JQuery, so:

Navigation

Try:

$('#myTable > tbody:last').append('<tr>...</tr><tr>...</tr>');

Reference: http://stackoverflow.com/a/171049