Forums >
PhotoMorpher >
How to auto-scroll page so max room available for pix?
Author
Message
1) gprangGroup: Members Posts: 5Joined: 2 Jan 2007Location: CA, USAIP: 69.227.--.--
Posted:
Many thanks to TwinHelix for PhotoMorpher... I think I have attributed correctly but if not, let me know! My idea is to have the page scroll when the "Next" or "Play" button is pushed, so any other content moves out of the way, allowing room for big pix on smallish screens. I know how to make an <A> anchor point, but not how to make javascript utilize it, sorry, I mean utilise it. My instance of PhotoMorpher is at http://www.creative-eye-studio.com/projects.htm if you wish to check it out. Thanks!
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
In an ONCLICK event for the buttons put this code:
location.hash = 'photomorpher';
and in the source code put this:
<a name="photomorpher" id="photomorpher">
which should do the trick nicely :). And thanks for the credit, it's quite fine!
Good luck - Angus.
3) gprangGroup: Members Posts: 5Joined: 2 Jan 2007Location: CA, USAIP: 69.227.--.--
Posted:
Angus, Thanks for your help. I ended up with addEvent(photo, 'setup', function() { addEvent(document.getElementById('photoPrev'), 'click', new Function('photo.prev(); return false')); location.hash = 'photomorpher'; which loads the page initially at the anchor point (the legend "Photo Gallery"). I first thought I wanted the page to load at the very top and move down only upon the first click, but it actually looks better loading to the anchor point at pageload. Thanks!