Hi,
I was wondering if someone can give me a code example for saving the scroll position of the browser with jquery? In my theme the user needs to scroll a little bit down so see the comments. When the user clicks to the next picture (or is doing a browser refresh) the browser should restore the last scroll position. I found out that it is possible to do it with jquery that my theme is using anyway. But I don't know how do it. Can someone give me an code example?
Thanks
Norbert
Comments
http://demos.flesler.com/jquery/scrollTo/
Might be easier than editing the links on the theme (depending on the theme).
'<script>
// When the document is loaded... NM
$(document).ready(function()
{
// Scroll the to the content area
$.scrollTo( '#content', 800, {easing:'elasout'} );
});
</script>'
Do I need to do more? Do I need to add somehow the scrollto-script function from jquery to my theme or is it allready in zenphoto integrated?
Thanks again for your help
Norbert
`
<?php if (($_zp_gallery_page) == 'image.php') { ?>
/js/jquery-scrollto.js">
$(document).ready(function() {$('#content').ScrollTo();});"; <?php }
?>
`