Thanks, Sandy.
#1 - Naming the ids sequentially worked (i.e., "top, top1, top2)
#2 I'm putting the following in the head of my doc and it's not working:
window.addEvent( 'load', function() {
ScrollLinks.start()
});
I guess I can't do it like that?
On Sunday, May 4, 2014 3:11:04 PM UTC-4, Sanford Whiteman wrote:
>
> > The error's saying "ID "top" already defined". Ok, I understand,
> > IDs are supposed to be unique. But when I change
> > it to class="top" it stops working.
>
> Don't really understand the conundrum. The browser's automatic
> hash-based scrolling (which happens without JavaScript, but on which
> smoothscrolling libraries are based) scrolls *one* element to the top.
> The element must have an ID. The problems come, when, for whatever
> reason, elements you want to scroll into view are unique, yet have no
> ID attribute (like if you get a collection of HTML elements from an
> Ajax request and you can't control the source).
>
> Your <a href="#top" id="top"> makes sense to scroll the clicked
> element to the top. I guess I can see the utility. But why do you need
> other elements to have the same id "top"? If they are to scroll
> themselves into view, they can have any unique ID; if they are to
> scroll 'top' into view, they can also have any unique ID.
>
> > 2. I have a function call to ScrollLinks.start(); that appears to be
> deprecated.
>
> > Like this: <body onLoad="ScrollLinks.start();">
>
> > The error says: "there is no attribute "onLoad""
>
> > Is there another way to call this that's not deprecated?
>
> window.addEvent( 'load', function() {
>
> ...
>
> });
>
> -- Sandy
>
>
>
>
>
>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.