jQuery and JavaScript basics

Sunday, February 16, 2014

Get the height and width of the view port


Add a div to the body and click run in jsfiddle


In chrome, inspect an element, in the console type $0 to get the element


In the console use the jquery hide method to hide the elemente


Data types


Variables, conditionals, operators, prefer ===, !== to avoid type coercion


Loops


Functions


Argument objects


Use arguments object to add variable number of arguments


Functions


Anonymous functions


Default Success Warning Important Info Inverse
B S W I ? O