Tuesday, July 13, 2010

JQuery

I am going through the jQuery: Novice to Ninja book. Find the useful snippets about jQuery below.

jQuery UI - jQuery User Interface, and it comprises a menagerie of useful effects and advanced widgets that are accessible and highly customizable through the use of themes.

It’s Just JavaScript! - Never forget that jQuery is just JavaScript! It may look and act superficially differ-ent—but underneath it’s written in JavaScript

$(document).ready() - Almost everything you do in jQuery will need to be done after the document is ready. It can be represented as just $(function() { alert('Hello World!'); } );

Firebug - Firebug is a particularly useful tool for examining the DOM in your browser

Accessing Grid - Grid rows can be accessed by the below jQuery $("#GridId tr"), firest row can be accessed as $("#GridId tr:first") and nth row can be accessed as $("#GridId tr:eq(n)")

CSS, Styles - Following jQuery can be used to set the grey background color in the odd rows. $("#GridId tr:odd") .css('background-color', 'gray')

This is for today.... Have a nice Programming Day :)

No comments:

Post a Comment