Join Joe Marini for an in-depth discussion in this video Manipulating attributes, part of jQuery Essential Training.
- [Teacher] Just as there are functions for…manipulating the content of documents…inside elements in text,…there are also functions for manipulating attributes.…Here, on the jQuery website,…let's click on the API documentation,…and then click on Attributes.…So there are two functions,…attr and removeAttr,…which are used to operate on attributes.…The attr function is used to read…the value of an attribute,…and if the attribute is not present on an element,…then the result is undefined.…
When called with both an attribute name and a value,…an attribute with that value is set on the element.…And removeAttr does what you'd expect,…which is remove the named attribute from an element.…So, let's exercise these in the code.…In your editor, let's go ahead…and open up the attributes_start file,…and this is where we'll exercise some of the code,…so let me just go ahead and bring this up in the browser…so you can see it before I get started.…And you can see, in this example,…I've got my example container div,…which has several images in it.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.