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 > Determining the Exact Query That Was Used

3.10. Determining the Exact Query That Was Used

3.10.1. Problem

While writing a plugin or a method that extends jQuery, you need to know exactly what the selection and the context used when calling the method so that the method can be recalled.

3.10.2. Solution

We can use the core properties .selector and .context in conjunction with each other so we can re-create the original query that was passed through. We need to use both in conjunction because not all queries to our function or plugin will be within the default document context:


  

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