jewlofthelotus/SlickQuiz — pull request #22 by cxelegance (2014-03-13 12:03:35+00:00)
Title: proposed fixes #11, fixes #14

Introduced event programming, for example: an onCompleteQuiz method that is passed quiz score and question count. Also introduced hooking in to jQuery animation callbacks; SlickQuiz uses jQuery fade animations which provide callback functions that were not being used. The functions can be useful, for example, to determine page/div height after a fade.

I hope the "house key" and "key notch" visualization is helpful for understanding how each internal method handles jQuery deferred objects and their resolutions.

Note that, if this solution is pulled into SlickQuiz, then future developers must be conscious of usage of jQuery animations in order to maintain accurate callback execution. But I think this is not tricky; add another "notch" on the "key" at the top of the main method, then use getKeyNotch() where the new animation callback is needed.