What about a different approach?

1. First think how a photoshop mask works, then think how to put that
in code.

2. Clone the custom logic scroll event to the 'click' event of the
number element (be careful of bubbling or propagation stuff)

3. Check browsers IE make sure it works. I am a bit bias towards FF
just because of Firebug, so I suggest doing it whichever browser
you're most comfortable with then worry about IE.

Functions used may possibly be stop(), cloneevent(), set(), and set()
because it's live, a lot of Firebug make sure you clear all of your
elements.  Like right clicking on the element inside firebug and log
events to the console etc...
If you're having bubbling issues play with the background-color for
development purposes to understand what events are being triggered.

This should be enough information.

-Holycrapperluigi over and out

On Jan 20, 12:15 pm, Aske <aaam...@gmail.com> wrote:
> @Florence: Great advice!
>
> @cbolson & Aaron Newton, i tried both, but they do no seem to work.
>
> I put it in the shell:http://mootools.net/shell/kEfN3/
>
> Anyone with great coding skills?
>
> To repeat: Press one of the numbers in the navbar in the bottom, and
> the whole window (body), should scroll to the image (there are 4
> currently). Eg. Press "2" and the window should scroll to image number
> two.
>
> Thanks in advance,
> lenkey
>
> On Jan 19, 5:54 pm, Aaron Newton <aa...@iminta.com> wrote:
>
> > I would try document.body.
>
> > On Tue, Jan 19, 2010 at 8:45 AM, cbolson <ch...@cbolson.com> wrote:
> > > Hi,
> > > I think that you want to scroll the whole window.
> > > Try this:
> > > var scroll = new Fx.Scroll(window, {  __rest of code__
>
> > > Chris
>
> > > On 19 ene, 16:52, Ryan Florence <rpflore...@gmail.com> wrote:
> > > > Welcome!
>
> > > > The fastest way to get help here is to simplify your issue and post a
> > > > live example onhttp://mootools.net/shell.  This allows another
> > > > developer to actually make changes to your code and provide solutions
> > > > faster.
>
> > > > - Ryan Florence
> > > > -http://ryanflorence.com
>
> > > > On Jan 19, 2010, at 8:14 AM, Aske wrote:
>
> > > > > Hi and thanks in advance, i have pretty simple problem. Quite new, so
> > > > > bare with me, i will get better fast :)
>
> > > > > I want to attain some simple horizontal scrolling like seen on this
> > > > > site (they use prototype):
>
> > > > >http://www.newworkmag.com/issue2.html
>
> > > > > if you click the navigation in the bottom the page scrolls to the
> > > > > image....
>
> > > > > I have made this site:
>
> > > > >http://copenhagenteaclub.dk/teapaper/teapaper/
>
> > > > > to quickly explain:
>
> > > > > an image container div with "white-space:no-wrap" (so that no line
> > > > > breaks occurs) , contains the images
>
> > > > > i simply want my little navigation in the bottom scroll the "body" to
> > > > > the image.
>
> > > > > In the Fx.Scroll demo they instantiate it on a wrapper div, which
> > > > > mootools then scrolls around in right?
> > > > > But since it is not a wrapper div i want to scroll around in, but the
> > > > > whole body i just put "body" in there. But i doesnt seem to work.
>
> > > > > You can see the relatively simple stuff going on in view source.
>
> > > > > Anyone know what i am doing wrong?
>
> > > > > -lenkey

Reply via email to