jquery.makeCollapsible: events for collapsing/expanding, tests
authorMatmaRex <matma.rex@gmail.com>
Sat, 23 Mar 2013 15:13:17 +0000 (16:13 +0100)
committerMatmaRex <matma.rex@gmail.com>
Wed, 3 Apr 2013 15:48:43 +0000 (17:48 +0200)
commita72eb7fd4261748009e8da94aad573afd80f95af
tree2830c3fe5582723e3dfa4908cebe80a4639766e7
parentf4d8165c9e54725f9fce8780e300991e36dad55c
jquery.makeCollapsible: events for collapsing/expanding, tests

Trigger a custom event to allow callers to hook to the
collapsing/expanding, allowing the module to be testable and making
it possible to e.g. implement persistence via cookies.

Added tests for the triggers themselves and for some basic
asynchronous collapsing functionality.

The following four events are fired (the namespace used is the same
one as the one used for firing the click event for initial toggle):
* beforeExpand.mw-collapsible
* beforeCollapse.mw-collapsible
* afterExpand.mw-collapsible
* afterCollapse.mw-collapsible

Change-Id: I580365770d061418a6734fcb54b2d86f2a821748
resources/jquery/jquery.makeCollapsible.js
tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js