OK, well there doesn't seem to be a situation like that on the demo page, so I created one by editing the markup for the first demo, adding id, height, and overflow-y to the container div:
Code:
<div id="listingpaginate" class="paginationstyle">
<a href="#" rel="previous" class="imglinks"><img src="35.gif" /></a> <select></select> <a href="#" rel="next" class="imglinks"><img src="36.gif" /></a>
</div>
<div id="scroller1" style="max-width: 450px; border: 1px dashed gray; padding: 10px; height: 300px; overflow-y: scroll;">
content paragraphs removed to save space
</div>
By giving it an explicit height less than the height of it contents and an overflow-y of scroll, it will have a scrollbar, and you can scroll it, and if you don't return it to its top and change the content, it will be somewhere other than the top when the next content appears. I added the id so I would have a way of accessing it. The paginate div already had an id. I then added code in the console, which you can add as this script as long as it comes after the markup for the pagination instance, it's holder and contents:
Code:
<script>
(function(){
var pg = document.getElementById('listingpaginate'), pgls = pg.getElementsByTagName('a'), pgselect = pg.getElementsByTagName('select')[0];
function resettop(){document.getElementById('scroller1').scrollTop = 0;}
pgls[0].addEventListener('click', resettop, false);
pgls[1].addEventListener('click', resettop, false);
pgselect.addEventListener('change', resettop, false);
})();
</script>
That way, each time a paginate link is clicked or the paginate select is changed, the content holder will scroll to the top. If you're using additional methods for loading content, additional code may be necessary, depending upon what you're doing.
If you want more help, please post a link to the page on your site that has the problematic code.
Bookmarks