- Write jQuery selectors to select different HTML elements
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 box4 and a class of box5. - 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
View jQuery Selectors Lab on Learn.co and start learning to code for free.