 <p>There must be trouble with your click event for your links. It might be a good idea to just make a function responsible for doing whatever action (back/forward), then call that whenever you need it.</p>