32 lines
587 B
JavaScript
Executable File
32 lines
587 B
JavaScript
Executable File
/**
|
|
* The set of statements that are executed in the browser console to try out
|
|
* jQuery selectors
|
|
*/
|
|
|
|
// Get all img elements on the page
|
|
$("img");
|
|
|
|
// Get all elements with a class of `card_image`
|
|
$(".card_image");
|
|
|
|
// Get the footer by its ID
|
|
$('#my_footer');
|
|
|
|
// All paragrapgh elements in the `footer`
|
|
$("footer p");
|
|
|
|
// Get all header elements (h1-h6)
|
|
$(":header");
|
|
|
|
// Get first element on the page
|
|
$(":first");
|
|
|
|
// Get the last `div` on the page
|
|
$("div:last")
|
|
|
|
// Get the last `img` on the page
|
|
$("img:last");
|
|
|
|
// Get all elements that have an attribute of `href`
|
|
$("[href]")
|