ImpressCMS/impresscms

View on GitHub
htdocs/install/jquery.scrollTo.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function scrollTo has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.scrollTo = function( target, duration, settings ){
        if( typeof duration == 'object' ){
            settings = duration;
            duration = 0;
        }
Severity: Major
Found in htdocs/install/jquery.scrollTo.js - About 2 hrs to fix

    Unexpected trailing spaces found.
    Open

                        attr[key] = val.slice && val.slice(-1) == '%' ? 

    Unexpected trailing spaces found.
    Open

            

    Unexpected trailing spaces found.
    Open

                

    Unexpected trailing spaces found.
    Open

                        

    Unexpected trailing spaces found.
    Open

                

    Unexpected trailing spaces found.
    Open

     *     @option {Function} onAfter Function to be called after the scrolling ends. 

    Unexpected trailing spaces found.
    Open

        

    Unexpected spaces found.
    Open

                 - Math.min( html[size]  , body[size]   );

    Unexpected trailing spaces found.
    Open

                    doc.body : 

    Unexpected trailing spaces found.
    Open

                

    Unexpected trailing spaces found.
    Open

        

    Unexpected trailing spaces found.
    Open

                        

    Unexpected trailing spaces found.
    Open

                animate( settings.onAfter );            

    Unexpected trailing spaces found.
    Open

     *                alert('scrolled!!');                                                                   

    Unexpected trailing spaces found.
    Open

                            // Get the real position of the target 

    Unexpected trailing spaces found.
    Open

            

    Unexpected trailing spaces found.
    Open

            return Math.max( html[scroll], body[scroll] ) 

    Unexpected trailing spaces found.
    Open

     *        - The string 'max' for go-to-end. 

    Unexpected trailing spaces found.
    Open

            

    Unexpected trailing spaces found.
    Open

                    }else{ 

    There are no issues that match your filters.

    Category
    Status