New Landing How can we help? Themeforest Theme Support Dante Smooth scroll on FAQ

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Dante
  • #53255
    NMillard
    Member
    Post count: 115

    Hey,

    Is it possible to do something like smooth-scoll-link on FAQs?

    #53478
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please go to Admin -> Theme Options -> Custom JS and put this code

    jQuery('a[href^="#"]').bind('click.smoothscroll',function (e) {
    
        e.preventDefault();
    
        var target = this.hash;
    
            $target = $(target);
    
        jQuery('html, body').stop().animate({
    
            'scrollTop': $target.offset().top
    
        }, 500, 'swing', function () {
    
            window.location.hash = target;
    
        });
    
    });

    Note -: Back to Top Arrow will not work with this code
    With Best Regards
    Swift Ideas

    #53502
    NMillard
    Member
    Post count: 115

    Thanks ๐Ÿ™‚

    Seems like it still doesn’t work after I’ve put in the JS code.

    If you wish, you can have a look at the site
    http://proextensions.dk/betydning/#metoder

    I appreciate your help

    #53509
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove that code and put code like that

    <script>
    jQuery('a[href^="#"]').bind('click.smoothscroll',function (e) {
    
        e.preventDefault();
    
        var target = this.hash;
    
            $target = $(target);
    
        jQuery('html, body').stop().animate({
    
            'scrollTop': $target.offset().top
    
        }, 500, 'swing', function () {
    
            window.location.hash = target;
    
        });
    
    });
    </script>

    Thanks

    #53540
    NMillard
    Member
    Post count: 115

    Seems like the FAQ links doesnt work now..
    I just copy and pasted it

    #53546
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please once again remove current and put new code

    <script>
    jQuery('a[href^="#"]').bind('click.smoothscroll',function (e) {
    
        e.preventDefault();
    
        var target = this.hash;
    
            $target = jQuery(target);
    
        jQuery('html, body').stop().animate({
    
            'scrollTop': $target.offset().top
    
        }, 500, 'swing', function () {
    
            window.location.hash = target;
    
        });
    
    });
    </script>
    #53550
    NMillard
    Member
    Post count: 115

    Thanks! It works! ๐Ÿ˜€

    Much appreciated!

    #53555
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    HI,
    You most welcome ๐Ÿ˜€ .

    With Best Regards
    Swift Ideas

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register