Join Joe Marini for an in-depth discussion in this video Attribute filters, part of jQuery Essential Training.
- You can get pretty far using the basic jQuery filters…but you'll run into scenarios…where you need a little bit more power.…jQuery provides some more advanced filters…which we'll take a look at now.…So in your code editor, open up the AttrFilters_start file.…The attribute filters in jQuery…let you perform various tests…to see if attributes are present…and optionally contain certain values.…In this first example, I'll write a jQuery selector…that's looking for paragraph tags.…And for attribute filters,…we put the attributes inside square brackets.…
Let me go ahead and write the code for that.…I'm gonna write p,…and then class inside these square brackets…and then I'll use my CSS function to highlight it.…In this case, my selector looks for paragraph tags…and using this syntax, the name of the attribute…inside these square brackets,…it's looking for paragraph tags that have a class attribute…and in this case, we don't care what the value is.…We're just testing to see if it's there.…If we scroll down in the document,…
- What is jQuery?
- Using selectors and filters to extract information
- Creating, inserting, and animating page content
- Handling events
- Understanding jQuery statement chaining
- Working with CSS
- Building event handlers
- Animating with jQuery: showing, hiding, and fading page elements
- Working with AJAX
Skill Level Beginner
1. A Quick Introduction to jQuery
2. Working with Page Content
3. Manipulating Page Content
4. jQuery Events
5. Animations and Effects
6. AJAX Operations
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.