The script assumes the "next" link is the last link within the pagination links. If you wish to move it so it's next to the "Prev" link (or 2nd place), you need to make the following two changes:
1) Modify the HTML so the "next" button is physically moved:
Code:
paginateHTML+='<li><a href="#previous" rel="'+(selectedpage-1)+'">« Prev</a></li>\n<li><a href="#next" rel="'+(selectedpage+1)+'">next »</a></li>\n'
2), Then, modify the below lines within the script with the changes in red:
Code:
var prevlinkoffset=2
paginatelinks[1].className=(selectedpage==this.pageinfo.page.length-1)? "prevnext disabled" : "prevnext"
paginatelinks[1].setAttribute("rel", selectedpage+1)
Attached is the final modified ajaxpagination.js file.
Bookmarks