Javascript Cheatsheet

Cheatsheets

These are basic javascript cheatsheets, very much inspired by Shawn Mels@Twitter.

Click the images for larger view.

Check the linked javascript file for most up-to-date content.

DOM Playground

Single element

You haven't clicked me yet...

Multiple elements

Keyboard

Press any key:

Target and "this"

1
2
3

currentTarget (orange) or "this" is the element whose eventListener triggered the event.

target (green) is where the event started.

If we stop propagation, only the inner-most element will register the event.

Interactive List