Sunday 8 May 2011

Truthy and Falsy

Values that evaluate to true
1'0';
2'any string';
3[];  // an empty array
4{};  // an empty object
51;   // any non-zero number
Values that evaluate to false
10;
2''// an empty string
3NaN; // JavaScript's "not-a-number" variable
4null;
5undefined;  // be careful -- undefined can be redefined!

JQuery - Referencing the core jQuery file within the document header

Go to http://code.google.com/apis/libraries/devguide.html where the jQuery code file can be piped

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>