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 1. jQuery Basics > Using the $ Alias Without Creating Global Conflicts

1.18. Using the $ Alias Without Creating Global Conflicts

1.18.1. Problem

You want to use the shortcut $ alias instead of typing the global namespace name (jQuery) without fear of global conflicts.

1.18.2. Solution

The solution here is to create an anonymous self-invoking function that we pass the jQuery object to and then use the $ character as a parameter pointer to the jQuery object.


  

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