Skip to content

Commit 506652d

Browse files
committed
Grid SPF: Add table header to menugrid demo
1 parent 7a9f501 commit 506652d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

grid-spf/menugrid.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
});
6969
</script>
7070
<style>
71+
thead td { text-align: center; }
7172
thead th {
7273
cursor: default;
7374
}
@@ -94,6 +95,9 @@
9495
<h2>Movies! Click headers to sort, use inputs for filtering, pager for paging</h2>
9596
<table id="movies">
9697
<thead>
98+
<tr>
99+
<td colspan="5" class="ui-widget-header">Developers Grid</td>
100+
</tr>
97101
<tr>
98102
<th width="600" data-property="Name" data-type="string">Name</th>
99103
<th width="100" data-property="ReleaseYear" data-type="number">Release Year</th>

grid-spf/menugrid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ $.widget("spf.menugrid", {
1515
}).append( '<span class="ui-icon-asc ui-icon ui-icon-carat-1-n"></span><span class="ui-icon-desc ui-icon ui-icon-carat-1-s"></span>' );
1616

1717
var thead = this.element.find( "thead" );
18-
var inputs = thead.children()
18+
var inputs = thead.children(":has(th)")
1919
.clone()
20-
.insertAfter( thead )
20+
.appendTo( thead )
2121
.find( "th" )
2222
.removeAttr("tabindex")
2323
.each(function() {

0 commit comments

Comments
 (0)