diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -23,6 +23,7 @@ See the [jquery.matchHeight.js demo](http://brm.io/jquery-match-height-demo). - data attributes API - can be removed when needed - maintain scroll position correctly +- callback events - tested in IE8+, Chrome, Firefox, Chrome Android ### Status @@ -80,6 +81,20 @@ All elements with the same group name will be set to the same height when the pa Note that `byRow` will be enabled when using the data API, if you don't want this then use the alternative method above. +#### Callback events + +Since matchHeight automatically handles updating the layout after certain window events, you can supply functions as global callbacks if you need to be notified: + + $.fn.matchHeight._beforeUpdate = function(event, groups) { + // do something before any updates are applied + } + + $.fn.matchHeight._afterUpdate = function(event, groups) { + // do something after all updates are applied + } + +Where `event` a jQuery event object (e.g. `load`, `resize`, `orientationchange`) and `groups` is a reference to `$.fn.matchHeight._groups` (see below). + #### Removing It is possible to remove any matchHeight bindings for a given set of elements like so |