Traversing - Exercise

Contact Us or call 1-877-932-8228
Traversing - Exercise


Duration: 10 to 20 minutes.

Open index.html again in your browser. Use sandbox.js to accomplish the following:

  1. Select all of the image elements on the page; log each image's alt attribute.
  2. Select the search input text box, then traverse up to the form and add the 'showMe' class to the form.
  3. Select the list item inside #myList that has a class of 'current' and remove that class from it; add a class of 'current' to the next list item.
  4. Select the select element inside #specials; traverse your way to the submit button. Set its disabled attribute to true.
  5. Select the first list item in the #slideshow element; add the class 'current' to it, and then add a class of 'disabled' to its sibling elements.