Join Joe Chellman for an in-depth discussion in this video Shorter code with chaining, part of jQuery for Web Designers.
- [Voiceover] In this video,…we're going to talk about method chaining,…which is a way to take the operations that you're doing…to elements in your jQuery code…and making them a little shorter…and hopefully a little easier to read.…So here on my Build a Bouquet page from Hansel & Petal…I want to make some changes to these items in this…Build a Bouquet grid here.…So I'm going to right click and inspect the elements…to see what I need to select.…I'm going to start with this grid ID.…So I'm going to double click this to select just the…text in there and copy it.…
Close the console and then I'm going to switch over…to my script file, which I have open in my text editor.…So this is just a starting point…with my ready 'function' and my 'use strict'.…So what I'm going to do is make a selection of that…grid first and I'm going to save it in 'variable'.…This is a good practice to get into so that you don't have…jQuery make the same selection over and over again.…So I'm going to call it 'grid'…and I like to prefix the variable names…
- When to use jQuery
- Installing jQuery
- Setting up functions
- Using jQuery classes
- Modifying the DOM
- Event binding
- Reading and setting values
- Integrating plugins
- Animating websites with jQuery
Skill Level Intermediate
1. jQuery Introduction
2. Essential Concepts
3. It's Easier in jQuery
4. Integrate a Plugin
- 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.