[jQuery] jquery tablesorter + pager not working together
Hello
I am using tablesorter + pager and almost everything works fine. I got one
small problem. When i sort table sometimes height of the table changes
(because some values in columns are bigger and need 2 rows to display them)
but the position of the div containing pager does not change. It works when
i change numbers of rows displayed using pager. I am total newb in jquery
and javascript. I found out that there is a function fixPosition() in
jquery.tablesorter.pager.js, but i suppose the function is not available in
jquery.tablesorter so standard table sorting does not fix the position of
the pager div. How to fix this issue?. I tried manipulating with css (at
which i am newb also) but with no effects.
Below my code:
head section:
<script type="text/javascript" id="js">$(document).ready(function() {
// call the tablesorter plugin
$("#stat").tablesorter({
// sort on the first column and third column, order asc
widthFixed: true, widgets: ['zebra']
}).tablesorterPager({container: $("#pager"), positionFixed: false});
}); </script>
body:
<body>
<s:include value="header.jsp" />
<div>
<table id="stat" position="relative" class="tablesorter">
<caption><h1>Statystyki importu</h1></caption>
<thead>
<tr>
<th scope="col">Tabela</th>
<th scope="col">Wiersze</th>
<!-- <th scope="col">Ostatni importowany id</th>-->
<th scope="col">Data</th>
<th scope="col">Czas</th>
<th scope="col">Wydajność</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<s:iterator value="statisticsList">
<tr>
<td><s:property value="schemaName" />.<s:property value="tableName"
/></td>
<td style="width:70px"><s:property value="importedRows" /></td>
<!-- <td><s:property value="lastImportedId" /></td>-->
<td style="width:70px"><s:property value="date" /></td>
<td style="width:50px"><s:property value="importTime" /></td>
<td style="width:80px"><s:property value="yield" /></td>
<td><s:property value="error" /></td>
</tr>
</s:iterator>
</tbody>
</table>
</div>
<div id="pager" class="pager" style="margin-top:20px;">
<form>
<s:url value= " class="first"/>
<s:url value= " class="prev"/>
<input type="text" class="pagedisplay"/>
<s:url value= " class="next"/>
<s:url value= " class="last"/>
<select class="pagesize">
<option selected="selected" value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
</select>
</form>
</div>
</body>
--
View this message in context: http://www.nabble.com/jquery-tablesorter-%2B-pager-not-working-together-tp24807424s27240p24807424.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.