- Write jQuery selectors to select different HTML elements
You have stumbled upon an HTML site written by a middle school girl from the early 2000s. This is a perfect testing ground for your jQuery skills.
In js/selectors.js write the code necessary to select 5 different elements from the index.html page. There are tests to keep you on track!
- Write a function,
h1Selector
, that selects all<h1>
elements and returns them using an element selector. - Write a function,
liInOlSelector
, that selects and returns all<li>
inside of<ol>
using a descendant selector. - Write a function,
linkSelector
, that selects and returns the<a>
that is inside of the element that has both an id of my-id and a class of my-class. - Write a function,
catSelector
, that selects and returns the image of the cat that has the alt text equal to "cat sleeping". - Write a function,
checkboxInputSelector
, that selects and returns all the checkbox inputs