Skip to content
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

Events / Event Helpers Page needs a overhaul #608

Open
RedWolves opened this issue Jan 8, 2015 · 5 comments
Open

Events / Event Helpers Page needs a overhaul #608

RedWolves opened this issue Jan 8, 2015 · 5 comments

Comments

@RedWolves
Copy link
Member

https://learn.jquery.com/events/event-helpers/

After we removed the .toggle() event helper in gh-529 the page is pretty sparse and could use a bit more help.

Let's discuss at the next content meeting.

@arthurvr
Copy link
Member

arthurvr commented Jan 8, 2015

IMHO, things worth mentioning in that article:

  • The special change event, however the current explanation can better.
  • event.which, event.target, event.timeStamp, ...
  • stopPropagation() and stopImmediatePropagation(), the difference between them.

I could take a few of those, if you like.

@dmethvin
Copy link
Member

dmethvin commented Jan 8, 2015

We don't recommend using shorthand methods but can't remove them, so I'd prefer we just teach .on() for attaching events.

@dmethvin
Copy link
Member

dmethvin commented Jan 8, 2015

Actually, the .hover() method is best avoided as well because it's not really hover. It's just a shorthand for mouseenter/leave.

@arthurvr
Copy link
Member

arthurvr commented Jan 8, 2015

Actually, the .hover() method is best avoided as well because it's not really hover. It's just a shorthand for mouseenter/leave.

Well, let's remove the current section on .hover() and include this explanation.

@dmethvin
Copy link
Member

dmethvin commented Jan 8, 2015

Perhaps just mention that .hover() and the event shortcut methods are archaic ones that are best not used on modern code? That is, you may see them around but don't use them yourself. Kind of like .bind(), .delegate() etc. today, still supported but not recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants