From 398031103ffe7f02fa10caa8c205d9b8db51bd9a Mon Sep 17 00:00:00 2001 From: Jonas Mosbech Date: Tue, 16 Feb 2016 21:39:38 +0100 Subject: [PATCH] Fix confusion about scrollableArea option --- readme.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 1c34bc7..ca87294 100644 --- a/readme.md +++ b/readme.md @@ -55,13 +55,10 @@ $('table').stickyTableHeaders({fixedOffset: $('#header')}); ``` ####`scrollableArea` -A DOM element or jQuery object. Allows you to overwrite which surrounding element is scrolling. Defaults to `window`. [Check this demo for an example](https://github.com/jmosbech/StickyTableHeaders/tree/master/demo/scrollable-div.html) - - -As described in [pull request #33](https://github.com/jmosbech/StickyTableHeaders/pull/33) responsive pages might need to re-initialize the plugin when the user resizes his browser. This is can be done by calling the plugin with the new options: +A DOM element or jQuery object. Allows you to overwrite which surrounding element is scrolling. Defaults to `window`. [Check this demo for an example](https://github.com/jmosbech/StickyTableHeaders/tree/master/demo/scrollable-div.html): ```js -$('table').stickyTableHeaders({fixedOffset: [new-offset]}); +$('table').stickyTableHeaders({scrollableArea: $('.scrollable-area')}); ``` ####`cacheHeaderHeight` @@ -73,6 +70,12 @@ Default value: `false` $('table').stickyTableHeaders({cacheHeaderHeight: true}); ``` +###Reinitialize +As described in [pull request #33](https://github.com/jmosbech/StickyTableHeaders/pull/33) responsive pages might need to reinitialize the plugin when the user resizes his browser. This is can be done by calling the plugin with the new options: + +```js +$('table').stickyTableHeaders({fixedOffset: [new-offset]}); +``` ###Events The plugin triggers the following events on the targeted `` element: