cs1520: lab 10 ============== This lab will serve as an introduction to Javascript and jQuery. Javascript is a client side scripting language used in browsers. It is used to create dynamic webpages and interfaces. jQuery is the most popular javascript library in use. It provides utilities for many things, such as: * DOM traversal and modification (using CSS selectors) * CSS style manipulation * Effects and animations * Ajax * Plugins and widgets Exercises: ---------- You are encouraged to ask questions, work together, and consult the jQuery documentation. Having strong Google-fu is an important skill. 1. run and understand the basic example. 2. create a checkerboard pattern by changing the background-color of the table cells. 3. make the table cells change color when clicked and display the id of the cell in a text field or div. some example jQuery selectors: $(this) Current HTML element $("#intro") The first element with id="intro" $(".intro") All elements with class="intro" $("p") All

elements $("p.intro") All

elements with class="intro" $("p#intro") All

elements with id="intro" $("p#intro:first") The first

element with id="intro" $("ul li:first") The first

  • element of the first