Results 1 to 2 of 2

Thread: virtualpagination and adding a view all option

  1. #1
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default virtualpagination and adding a view all option

    1) Script Title: Virtual Pagination script v2.1

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pagination.htm

    3) Describe problem: playing with this script and i am having issues trying to add a "view all" option so that it will do just that. i am not that good with JS coding and its hard to wrap my mind around it but if i could get a hint on to what to look for or the answer that would be nice. thank you

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try the below attached modified .js file. Then, use a link like the code in red below to add a "show all" option:

    Code:
    <!-- Pagination DIV for Demo 1 -->
    <div id="gallerypaginate" class="paginationstyle">
    <a href="#" rel="previous">Prev</a> <span class="flatview"></span> <a href="#" rel="next">Next</a>
    </div>
    
    <!-- Initialize Demo 1 -->
    <script type="text/javascript">
    
    var gallery=new virtualpaginate({
    	piececlass: "virtualpage", //class of container for each piece of content
    	piececontainer: 'div', //container element type (ie: "div", "p" etc)
    	pieces_per_page: 1, //Pieces of content to show per page (1=1 piece, 2=2 pieces etc)
    	defaultpage: 0, //Default page selected (0=1st page, 1=2nd page etc). Persistence if enabled overrides this setting.
    	wraparound: false,
    	persist: false //Remember last viewed page and recall it when user returns within a browser session?
    })
    
    gallery.buildpagination(["gallerypaginate", "gallerypaginate2"])
    
    </script>
    
    <a href="javascript:gallery.navigate(2)">Go to 3rd page within "gallery"</a>
    <br />
    
    <a href="javascript:gallery.showall()">Show all</a>
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    drifterz28 (02-19-2010)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •