PDA

View Full Version : Virtual Pagination Bopping



Ecnarongi
05-28-2008, 11:05 AM
Script: Virtual Pagination
http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm

I am using a table to display the contents of my search results. My tr tags hold the class which is used to paginate the contents.




<div style="width: 400px; height: 84px">
<table>
<tr class="funkypage6">
<td>First Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Second Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Third Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Fourth Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Fifth Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Sixth Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Seventh Piece within Content</td>
</tr>
<tr class="funkypage6">
<td>Eighth Piece within Content</td>
</tr>
</table>
</div>

<div id="tableDiv" class="paginationstyle">
<a href="#" rel="previous">Prev</a> <span class="flatview"></span> <a href="#" rel="next">Next</a>
</div>

<script type="text/javascript">
//virtualpaginate(className, pieces_to_show_per_page)
var pagecontent=new virtualpaginate("funkypage6", 2, "tr")
pagecontent.buildpagination("tableDiv")

</script>



Every time I click on the next or prev buttons the contents jump all over the page. I did as the author of the script suggested and wrapped a div around the contents but no dice. I would like to know if anyone has had a similar problem or can provide me with a clue as to it's solution.

Ecnarongi
06-01-2008, 11:52 PM
if I have nothing else on the page but a generic style



.funkypages6{
padding: 0;
text-decoration: none;
border: 0;
margin: 0;
}


or no style at all and keep refreshing the page the elements in the table jump a pixel or two up and down. This happens to only the last two visible elements on the page. Once I click next the entire table jumps down, then continues to paginate from that point. Only to go through all the page then it will jump down again.

I have attempted to places even more divs around the table with no luck. Any suggestions I will try, thank you.