Accessing jQuery in Your JavaScript

jQuery("#myElement") . . . or . . . $("#myElement")

jQuery is accessed using the jQuery object that is defined when the library is loaded. jQuery also provides a shortcut $ character that you can use in the phrases throughout the book. For example, the following two jQuery statements are identical:

jQuery("#myElement") $("#myElement")

Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.