Results 1 to 3 of 3

Thread: Link names in Virtual Pagination

  1. #1
    Join Date
    Oct 2007
    Posts
    38
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Link names in Virtual Pagination

    1) Script Title: Virtual Pagination script v2.0

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

    3) Describe problem: No problem

    Would like to have the script tweaked, so when using class=flatview, it shows the names of each page on the href, when i hover each link.

    like gmail (each section shows #inbox, #stared, etc).

    if i could get some help on this, would be great!

    or some pointers so i can do it myself..

    either way helps appretiated

    thanks
    Last edited by ricmetal; 03-10-2009 at 06:32 AM. Reason: thanking anyone for possile future change to the code

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

    Default

    Try finding the below code inside the .js file:

    Code:
    	for (var i=0; i<this.pagecount; i++){
    		if (typeof anchortext[i]!="undefined") //if custom anchor text for this link exists
    			flatviewhtml+='<a href="#flatview" rel="'+i+'">'+anchortext[i]+'</a> ' //build pagination link using custom anchor text
    		else
    			flatviewhtml+='<a href="#flatview" rel="'+i+'">'+(i+1)+'</a> ' //build  pagination link using auto incremented sequential number instead
    	}
    And replace it with:

    Code:
    var anchortext=anchortext || new Array()
    	for (var i=0; i<this.pagecount; i++){
    		if (typeof anchortext[i]!="undefined") //if custom anchor text for this link exists
    			flatviewhtml+='<a href="#'+anchortext[i]+'" rel="'+i+'">'+anchortext[i]+'</a> ' //build pagination link using custom anchor text
    		else
    			flatviewhtml+='<a href="#page'+(i+1)+'" rel="'+i+'">'+(i+1)+'</a> ' //build  pagination link using auto incremented sequential number instead
    	}
    DD Admin

  3. #3
    Join Date
    Oct 2007
    Posts
    38
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    looks cool
    althought, id like to display small letters on the link while leaving capital letters on the pagination buttons.
    but ill take it from here and try to tweak some more!
    thanks ddadmin

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
  •