No-Library (pure JS), HTML, CSS, JavaScript
Meh, it works...
Only in ES5
Using JS's native prototype object for good program structure.
Behavioral design pattern that allows for a unified interface through which the different parts of the system may communicate.
A simple publish/subscribe implementation from Addy Osmani!
Observer are interested in the state of a subject, and are updated by changes in subject
Only one instance is the Singleton way.
Public interface
Yet another counter example!
getStats() is shared among Car objects via the prototype.
Useful!
one day, only browsers that support this will be around.
jQuery 1.9.1, HTML, CSS, JavaScript
Click the image, Youtube video plays.
From John Resig's Pro Javascript Techniques.
Custom events make it easy!