$() Function

By: Dusty Arlia
Published on Thursday, August 1, 2013, 07:15 AM
Last Updated on Saturday, July 11, 2015 at 9:09 PM
Total Updates: 2

You are able to access any jQuery function through the use of the $() function. jQuery defined $() to be used as a shortcut for the jquery() function. This shortened name is used because of how often you have to reference this function. Both the $() and jquery() functions work the same, but the use of $() is more common and recommended for speed (easier to type), readability, and file size. The benefits to using the shortcut function are minor, but it helps to build good habits and follow industry best practices.