Events / Event Helpers Page needs a overhaul
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.
IMHO, things worth mentioning in that article:
- The special
changeevent, however the current explanation can better. -
event.which,event.target,event.timeStamp, ... -
stopPropagation()andstopImmediatePropagation(), the difference between them.
I could take a few of those, if you like.
We don't recommend using shorthand methods but can't remove them, so I'd prefer we just teach .on() for attaching events.
Actually, the .hover() method is best avoided as well because it's not really hover. It's just a shorthand for mouseenter/leave.
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.
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.