jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.
To return a value, the function must have a return statement that specifies the value to return.
A function created with the function statement is a Function object and has all the properties, methods, and behavior of Function objects. See Function for detailed information on functions.
A function can also be declared inside an expression. In this case the function is usually anonymous. See function operator for more information about the function (function expression).
Functions can be conditionally declared. That is, a function definition can be nested within an if statement. Technically, such declarations are not actually function declarations; they are function expressions.
This book introduces you to the jQuery programming model and guides you through the major features and techniques you'll need to be productive immediately. The book anchors each new concept in the tasks you'll tackle in day-to-day web development and offers unique lab pages where you immediately put your jQuery knowledge to work. Includes resources on jQuery 1.2.
parseInt is a top-level function and is not associated with any object.
The parseInt function parses its first argument, a string, and attempts to return an integer of the specified radix (base). For example, a radix of 10 indicates to convert to a decimal number, 8 octal, 16 hexadecimal, and so on. For radixes above 10, the letters of the alphabet indicate numerals greater than 9. For example, for hexadecimal numbers (base 16), A through F are used.
If parseInt encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point. parseInt truncates numbers to integer values. Leading and trailing spaces are allowed.