This document provides an introduction to JavaScript and jQuery. It discusses where JavaScript is used, some popular uses of JavaScript like Google Maps and Twitter, and the basics of JavaScript including variables, functions, and control logic. It also introduces jQuery, describing what it is and how it can be used to select elements, handle events, and manipulate the DOM. The document recommends putting scripts at the end of the page body for optimal performance and emphasizes progressive enhancement.
4. Our Chat Today
• Where is JavaScript?
• Great uses of JavaScript
• The Basics of JavaScript
• An Intro to JQuery
5. Where’s JavaScript?
• Most popularly used for client side
behaviors on web pages
• Made popular on the server side with
NodeJS
• Start with the client side
6. A Note on Accessibility
• Great web developers develop with
accessibility in mind
• Make your web pages work great without
JavaScript using progressive
enhancement (more on this later)
26. So Much More...
• Regular Expressions
• Loops and Iteration
• Arrays
• Objects
27. JQuery
• A JavaScript Framework with roots in
Boston (John Resig)
• Removes the friction of cross-browser
behaviors for animation, event handling,
AJAX, and DOM manipulation
30. What Can I Do With a
Selector?
$("a").css("color"); //the color of a: blue
$("a").offset().top; //position of the element
$("a").hide(); //hide the element
$("a").remove(); //remove the element
$("a").addClass("context"); //add a class
$("a").after("<p>Hello</p>")); //append
31. What Can I Do With a
Selector?
$("a").css("color");
DOM
$("a").offset().top;
$("a").hide();
Manipulation
$("a").remove();
$("a").addClass("context");
$("a").insertAfter($("<p>Hello</p>"));