Skip to content

Explicitly describe $ as an alias for jQuery #681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions page/about-jquery/how-jquery-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ $( document ).ready(function() {
});
```

<div class="warning">**Note**: The jQuery library exposes its methods and properties via two properties of the <code>window</code> object called <code>jQuery</code> and <code>$</code>. <code>$</code> is simply an alias for <code>jQuery</code> and it's often employed because it's shorter and faster to write.</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this be in a class="warning" box? Might as well just have a normal paragraph about this. The warnings always give me the feeling something is a gotcha or something could go wrong, but in this case it's just a concept being introduced.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it doesn't flow well with the rest of the discussion which has another focus, so I put it in a "aside" bar.


For example, inside the `ready` event, you can add a click handler to the link:

```
Expand Down