Selecting Elements
Last updated
Last updated
When we target something using jQuery, it selects every element on the page that matches that selector.
Class names in Webflow should not contain spaces, capital letters, or start with a number.
Only selects hero-card elements that have a combo class of is-featured
Only selects dark-card elements that are inside of the hero-grid
We can target any element by its html tag. If unsure of the tag name, right click on any element & inspect on the published site to find its tag.
We can chain together multiple selectors by using commas to select different elements together.
We can also use the .add() method to select multiple elements. This is more useful for selecting multiple elements once they're already saved in separate variables.