t and do their own thing.

$(".panel").on("panelOpen", function() {
//AN_Xml:   // Developer 1: do Ajax stuff
//AN_Xml:});
//AN_Xml:
//AN_Xml:// Meanwhile, in another part of town...
//AN_Xml:$(".panel").on("panelOpen", function() {
//AN_Xml:   // Developer 2: do saving stuff
//AN_Xml:});

Yay for freedom! Yay for separation of functionality!

In my opinion custom events are just better all around. I do think they require a bit more communication though. You'll probably have to write up some comments somewhere that explain what custom events are fired and when and make that easy to discover.

View Demo of Custom Events model

More Information

The scenario outlined above is very simple. The following two articles go way more into depth about Custom Events including more complex examples and more information on how they work.

Custom Events are Pretty Cool is a post from CSS-Tricks

]]> http://css-tricks.com/custom-events-are-pretty-cool/feed/ 21 //AN_Xml: wfw:commentRss>http://css-tricks.com/musings-on-preprocessing/feed/ //AN_Xml: 90 //AN_Xml: //AN_Xml: //AN_Xml: Speech Bubble Arrows that Inherit Parent Color //AN_Xml: http://css-tricks.com/speech-bubble-arrows-that-inherit-parent-color/ //AN_Xml: http://css-tricks.com/speech-bubble-arrows-that-inherit-parent-color/#comments //AN_Xml: Mon, 06 Feb 2012 17:57:42 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16193 //AN_Xml:

Interesting question:

//AN_Xml:

css3 speech bubble question: for the "triangle"'s border color, how can I set it to whatever its parent div's bgcolor is automagically?

//AN_Xml:

— Jin Yang (@jzy) February 1, 2012

//AN_Xml:


//AN_Xml:

//AN_Xml:

By "css3 speech bubble", Jin means using a pseudo element on a container to add a little pointer arrow (triangle). Not really CSS3, but that's pedantic.

//AN_Xml:

//AN_Xml:

Let's say that pink color isn't practical to set in an external CSS file. Perhaps is a user setting, or perhaps …

Speech Bubble Arrows that Inherit Parent Color is a post from CSS-Tricks

]]>
//AN_Xml: Interesting question:

//AN_Xml: //AN_Xml:


//AN_Xml: cle">Direct Link to Article — Permalink

Responsive Navigation Patterns is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/responsive-navigation-patterns/feed/ //AN_Xml: 0 //AN_Xml:
//AN_Xml: //AN_Xml: //AN_Xml: