Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Beyond the Basics > Performing an Action on a Subset of the Selected...

3.7. Performing an Action on a Subset of the Selected Set

3.7.1. Problem

You need to perform an action on a set of tags, but there is no way to isolate these tags from all the other tags on the page in a jQuery selection set.

3.7.2. Solution

We can use the slice() method to filter the selection set to a subset. We pass it a starting index value and an ending index value, then we can chain our action at the end:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial