Help with bug using MooTools SmoothScroll

Posted on 2009-02-08
Last Modified: 2013-11-11
I'm using MooTools SmoothScroll and am having a problem with the screen flashing right before it starts scrolling.  I can't figure out why. Please help.

The site is here:
Question by:Ruby_Mauve
    LVL 19

    Accepted Solution

    I got several errors visiting your page.
    First of all, you're using jquery. Make sure the reference to the library if first before using it.

    on line 13 you have script where you get an element via jquery, while jquery isn't even loaded yet.
    on line 21 you have (allmost) the same script also before jquery is being loaded.

    Another thing, scripting in the head gets executed, no matter if the DOM is loaded.
    Change the script on line 21 to the following snippet.

    Remove script starting on line 13; you even use ` instead of '.

    Start from there and see if you still have errors.
    <script type="application/javascript">
    // this function will execute when DOM is ready
    $(function() {
            targeturl: 'feed://',
            items: 2

    Open in new window

    LVL 19

    Assisted Solution

    by:Albert Van Halen
    One more note
    On line 27 you have another script in where you use jquery with an id selector on brand-services.

    There is no element with that id in the DOM...

    Author Comment

    Thanks for the heads up and the revision to the code.  
    The extra jquery in there was left behind from me tinkering around.  
    I removed them but it is still flashing. Ah!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now