jquery.makeCollapsible: Only trigger custom events once per collapsible
authorMatmaRex <matma.rex@gmail.com>
Wed, 4 Sep 2013 14:48:09 +0000 (16:48 +0200)
committerMatmaRex <matma.rex@gmail.com>
Wed, 4 Sep 2013 14:51:29 +0000 (16:51 +0200)
commitb340bd4f6be3c90952ac7bcb0af2fd84c0cff900
tree6a040b6a59f62633ada0659789926b5d87ce5943
parentcd74d6228df8d93565929244c202a5682228ddeb
jquery.makeCollapsible: Only trigger custom events once per collapsible

The callback to $.fn.animate()-family functions is fired once per animated
element, not once per call.

Use $.when instead, which behaves the way we need here.

Discovered when writing tests committed in I33b067a7.

Change-Id: I9d61a34374d42609d8d80206f4a4b315f76a8d8d
resources/jquery/jquery.makeCollapsible.js