Description
There is some stuff in here that I want to eventually do.
simplify options object keys
i cant remember what some of the options are called. make them simpler and bump major version
Data attributes and plugin init
I am going to add the ability to initialize the plugin via data attributes
When using data attributes it would make sense to be able to init the plugin on when using overflow scrolling like this:
<div style='overflow:auto; height:100px' data-provide='floatThead'>
<table>.... </table>
</div>
which would be the equivalent to this (in the current version):
$('table').floatThead(scrollContainer: function($table){ return $table.closest('div'); })
except that I am thinking that it makes sense to allow you to run the floatThead plugin on non-table elements, and doing so will make the plugin assume that this is the scrollContainer
element. It will then find the first table element within that DOM element and initialize it with overflow scrolling.
Right now I throw an error if you run the plugin on non-table elements.
The alternative would be to support this kind of syntax:
<div style='overflow:auto; height:100px' id='my-container'>
<table data-provide='floatThead' data-fth-scroll-container='#my-container'>.... </table>
</div>
Doing this will not introduce any 'breaking' changes but its not quite as nice.