mkoryak/floatThead — pull request #114 by ritchieking (2014-09-22 00:41:17+00:00)
Title: Change iframe scrolling to use scrollContainer

Alright - cool. Lemme know what you think about this approach. Here's the usage:

```
$table = $('#framediv').find('table');
$table.floatThead({
scrollingTop: function($table) {
try {
return -$(window.parent.document).find('#framediv').offset().top;
}
catch(e) {
return 0;
}
},
scrollContainer: function($table) {
return $(window.parent);
}
});
```

It works when you set scrollContainer to return $(window.parent) basically by listening to scroll events coming from the scroll container (the parent) and then behaving as if that parent were the window (as opposed to an actual scroll container). Does that make sense?

I can't think of a good way to bake the scrollingTop function in. Problem is that you don't want to do something like `return -$(window.parent.document).find('iframe').offset().top;` or `return -$(window.parent.document).find('table').offset().top;` cause you might have other iframes or tables on the page.

I tested destroy...worked like a charm!