Jump to content
Larry Ullman's Book Forums

Recommended Posts

Sorry for the confusion. I don't think I use $() before (or in) Chapter 7, do I? In any case, that's just a terse name given to a user-defined function that makes for easy use. The function's name is $ and the () are the execution of that function.


This is what jQuery does for its main function. 

Link to post
Share on other sites

The first time I ever saw $ (for me, it was in the context of using jQuery), I was equally confused until I realized that $ is nothing more than just another variable name in JS.


Just like a, b, or J, $ is a valid variable name, and it was originally adopted as the short name for calling the jQuery function because it's only one character (thus quick to type), and at that time, $ wasn't really used by anything else, thus it was a pretty unique variable name that was easy to remember.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...