Actually, this script does support duplicate instances of itself on the page, as do most newer scripts on DD. What you're asking is different, that is, how to duplicate the pagination interface for a pagination instance on both the top and bottom of the content. Right now there's no easy way, though I'll most likely add such a feature down the line.
so instead is there a way to put "show" all to the right of the "next" ?
Yep, that's certainly do-able. Add the below new function to the end of virtualpaginate.js:
Code:
virtualpaginate.prototype.showall=function(){
for (var i=0; i<this.pieces.length; i++)
this.pieces[i].style.display="block"
}
Then on your HTML page, within your pagination interface, you would call instance.showall() to show all contents at once:
Code:
<!-- Pagination DIV for Demo 4 -->
<div id="galleryalt" class="paginationstyle" style="width: 300px; text-align: left">
<a href="#" rel="previous"><</a> <span class="flatview"></span> <a href="#" rel="next">></a> <a href="javascript:gallery.showall()">All</a>
</div>
<!-- Initialize Demo 4 -->
<script type="text/javascript">
var gallery=new virtualpaginate("virtualpage4", 1)
gallery.buildpagination("galleryalt", ["castle", "park", "harvest", "country"])
</script>
Bookmarks