3838 }
3939 } ) . menugrid ( ) ;
4040
41+ $ ( "#pagesize" ) . change ( function ( ) {
42+ movies . option ( "paging.limit" , + $ ( this ) . val ( ) ) . refresh ( ) ;
43+ } ) ;
44+
4145 $ ( "#pager" ) . pager ( {
4246 source : movies
4347 } ) ;
5256 tfoot td {
5357 text-align : center;
5458 }
59+ # movies {
60+ width : 800px ;
61+ }
5562 </ style >
5663</ head >
5764< body >
@@ -71,16 +78,16 @@ <h2>Movies! Click header for sort menu, use inputs for filtering, pager for pagi
7178< table id ="movies ">
7279 < thead >
7380 < tr >
74- < th data-property ="Name " data-type ="string "> Name</ th >
75- < th data-property ="ReleaseYear " data-type ="number "> Release Year</ th >
76- < th data-property ="AverageRating " data-type ="number "> Average Rating</ th >
81+ < th width =" 600 " data-property ="Name " data-type ="string "> Name</ th >
82+ < th width =" 100 " data-property ="ReleaseYear " data-type ="number "> Release Year</ th >
83+ < th width =" 100 " data-property ="AverageRating " data-type ="number "> Average Rating</ th >
7784 </ tr >
7885 </ thead >
7986 < tbody >
8087 </ tbody >
8188 < tfoot >
8289 < tr >
83- < td id ="pager " colspan =" 2 " class ="ui-state-default ">
90+ < td id ="pager " class ="ui-state-default ">
8491 < button data-page ="first "> First</ button >
8592 < button data-page ="prev "> Prev</ button >
8693 < span >
@@ -89,7 +96,17 @@ <h2>Movies! Click header for sort menu, use inputs for filtering, pager for pagi
8996 < button data-page ="next "> Next</ button >
9097 < button data-page ="last "> Last</ button >
9198 </ td >
92- < td class ="ui-state-default "> Viewing rows < span class ="paging-from "> 0</ span > to < span class ="paging-to "> 0</ span > of < span class ="paging-total "> 0</ span >
99+ < td class ="ui-state-default ">
100+ < label for ="pagesize "> Pagesize</ label >
101+ < select id ="pagesize ">
102+ < option > 10</ option >
103+ < option > 20</ option >
104+ < option > 30</ option >
105+ </ select >
106+ </ td >
107+ < td class ="ui-state-default ">
108+ Viewing rows < span class ="paging-from "> 0</ span > to < span class ="paging-to "> 0</ span > of < span class ="paging-total "> 0</ span >
109+ </ td >
93110 </ tr >
94111 </ tfoot >
95112</ table >
0 commit comments