Here’s one way you could do it. Paste this into the DOM Loaded Observer field in Protaculous 2 (apply that to the page first). Be sure to check Scriptaculous Effects on when you do.
Effect.SideScrollTo = function(element) {
var options = arguments[1] || { },
scrollOffsets = document.viewport.getScrollOffsets(),
elementOffsets = $(element).cumulativeOffset();
if (options.offset) elementOffsets[0] += options.offset;
return new Effect.Tween(null,
scrollOffsets.left,
elementOffsets[0],
options,
function(p){ window.scrollTo(p.round(), scrollOffsets.top); }
);
};
$$('.side-scroll').invoke('observe', 'click', function(evt){
evt.stop();
Effect.SideScrollTo(this.href.split('#').last());
});
Now in your page, create a link to the element you want to scroll to. This element must be absolutely positioned, not inline, for this to work. Click once on the element and look in the Name/ID field of the Inspector to see what it’s named. Go back to the origin where you want the effect to start from and create your link (this can be a graphic or text) using the Hyperlink dialog. Use the External tab, and enter # followed by the exact (case-sensitive) name you recorded of your target. Click the Extended button, then the New button, and in the resulting sub-sub-sub-dialog, enter the following name/value pair:
- Name: class
- Value: side-scroll
That should do it. Make a back button to scroll back, and repeat for any other interim scroll targets along the way.
Walter
On Mar 7, 2013, at 9:10 AM, Mark Lawrence wrote:
Oh dear, I’m fresh of kettles full of fish, so looks like I’ve hit a dead end.
Thanks for your post though Walt.
M
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options