Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    smooth scroll with javascript or without

    I want a fancy scrolling to work even when javascript is not enabled in your browser. javascript. http://gravitysign.com/fancyscroll/horizontal#/
    Removing slash / in the HTML code works without javascript but not with javascript.

    JavaScript:
    Code:
    window.onload = function(){      
       var fs=new fancyScroll({easingFunc: 'easeOutCubic',                
            easingTime: 1000,                
            deepLinking: true,                
            scrollMode: 'horizontal',                
            goTopText: 'Return'});    
       fs.addScroll(['sale','discount','new','contact']);      
    };

    HTML:
    Code:
    <a href="#/sale">Sale</a>   
    <a href="#/discount">Discount</a>   
    <a href="#/new">New</a>   
    <a href="#/contact">Contact us</a>

    An example of one that works with & without javascript but not something I want to use: tympanus.net/Tutorials/WebsiteScrolling/

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,895
    Thanks
    202
    Thanked 2,530 Times in 2,508 Posts
    Use the <noscript> tag to provide an alternate content for users that have disabled scripts in their browser or have a browser that doesn’t support client-side scripting.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •