View Single Post
Old 02-12-2008, 02:41 PM   #9 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

@Salathe- Thanks! Your method seems simpler.. However, there were some complications..

I want the "first" page only to appear when the page 1 is outside the span.

So if I'm on page 1 of 5, and the span is set to 2, it should display 1 2 3 .. Last.
When going to page 2, it should display 1 2 3 4 Last (<-- note that the dots are skipped here..).

page 3 it should display all links.
Page 4, it should display First 2 3 4 5 (<-- dots are not shown here because below 2, there's 1, and thus only need to display a First link)
And page 5 it should display First .. 3 4 5(<-- dots are shown here, because below 3, there's first the number 2, and that's why the 2 dots are replacing all numbers between the shown 3, and the first link)

How the dot system works is that I want it to only appear if the last or first link is more than 1 number below/above the shown span.

See screenshot for a view how it looks right now..

@Gibou- Thanks! Yes I know the difference.. but since I normally use xhtml(I write <br /> instead of <br> for example), I write <strong> instead of <b>. Same with <em> and <i> ...
Attached Thumbnails
pagination-class-help-page1.jpg  pagination-class-help-page3.jpg  
__________________
Tanax is offline  
Reply With Quote