I had a working script, made a few changes in attempts to cap the count page could go up to... Then somewhere I screwed it up and now my pageUp function no longer works. The function should section the URL to remove everything after #, up the page count, if the page count exceeds a certain point it does not load the next page. For whatever reason now it just doesn't work. It seems like the page number is not increasing. help?
Code:
// JavaScript Document
var page = 0;
var url2 = "";
var url = window.location.toString();
// Page jump function, limit chapter by pages
function pageUp() {
url2 = url.split('#')[0];
page = page + 1;
if (page <= 5)
{
window.location.href = url2 + '#a' + page;
}
}