Skip to content

Commit

Permalink
testcase for #99 and #98
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoryak committed Jul 31, 2014
1 parent 493b999 commit bf7e304
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies
markdown: rdiscount
pygments: true
highlighter: pygments

# Permalinks
permalink: pretty
Expand Down
1 change: 1 addition & 0 deletions tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ <h1>Tests</h1>
<li><a href="{{ site.base_url }}/tests/issue-82/">Issue 82</a></li>
<li><a href="{{ site.base_url }}/tests/issue-84/">Issue 84</a></li>
<li><a href="{{ site.base_url }}/tests/issue-86/">Issue 86</a></li>
<li><a href="{{ site.base_url }}/tests/issue-99/">Issue 99</a></li>
</ul>
</div>
113 changes: 113 additions & 0 deletions tests/issue-99.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
layout: lite
base_url: './../..'
slug: tests
bootstrap: false
desc: '1. When first (!) scrolling to the right and then downwards, the header dont respect the horizontal offset scrolling.
2. Also border uncollapses on header when floated because inline style is not copied'
issue: 99
---

<style>
th {
text-align: left;
color: white;
background: blue;
border: none;
}
</style>


<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
var $table = $('#tab');
$table.floatThead({
useAbsolutePositioning: false,
scrollContainer: function ($table) {
return $table.closest('#container');
}
});
});//]]>

</script>


<div id='jsfiddle'>
<div id="container" style="width: 800px; height: 200px; border: 1px black solid; overflow:auto;">
<table id="tab" style="table-layout: fixed; width: 1000px; border-collapse:collapse; border: none;">
<thead>
<tr>
<th colspan="2">Header1-2
</th><th>header3
</th></tr>
<tr>
<th colspan="2">Header1-2
</th><th>header3
</th></tr>
</thead>
<tbody>
<tr>
<td>Cell1Row1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1Row2</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
<tr>
<td>Cell1</td>
<td>Cell2</td>
<td>Cell3</td>
</tr>
</tbody>
</table>
</div>

</div>

0 comments on commit bf7e304

Please sign in to comment.