New Landing How can we help? Themeforest Theme Support Dante problems with smooth-scroll-link class

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #154548
    adonisdesigns
    Member
    Post count: 6

    Hi,

    Ive included the smooth-scroll-link class to my menu as shown in the screen shot attached but as you can see on my site it does not work. Am i doing something wrong?

    Thanks,
    Adonis

    Attachments:
    You must be logged in to view attached files.
    #154638
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please go to Admin -> Theme Options -> Custom CSS/JS -> Custom JS -> Insert given below code .

    <script>
    jQuery(‘li.smooth-scroll-link a’).on(‘click’, function(e) {

    var linkHref = jQuery(this).attr(‘href’);

    if (linkHref.indexOf(‘#’) === 0) {
    var spacerHeight = jQuery(linkHref).height(),
    headerHeight = 0;

    if (jQuery(‘.sticky-header’).length > 0) {
    headerHeight = jQuery(‘.sticky-header’).height();
    }
    if (jQuery(‘#wpadminbar’).length > 0) {
    headerHeight = headerHeight + 28;
    }

    jQuery(‘html, body’).stop().animate({
    scrollTop: jQuery(linkHref).offset().top + spacerHeight – headerHeight – 10
    }, 1000, ‘easeInOutExpo’);

    e.preventDefault();

    } else {
    return e;
    }

    });
    </script>
    Thanks
    Mohammad

    #154779
    adonisdesigns
    Member
    Post count: 6

    Hi Mohammad,

    Thanks for the script but unfortunately that doesn’t seem to have worked.

    Adonis

    #154796
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have resolved the issue so please check it now.
    Thanks
    Mohammad

    #154814
    adonisdesigns
    Member
    Post count: 6

    Hi Mohammad,

    I checked on a few computers and it looks the same to me.

    Adonis

    #154975
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its working perfect so please check it now.
    Thanks
    Mohammad

    #155094
    adonisdesigns
    Member
    Post count: 6

    Sorry Mohammad but this is what I see on my end. Could it be the way I’ve set up my anchors?

    Attachments:
    You must be logged in to view attached files.
    #155188
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its working perfect so please check.
    Thanks
    Mohammad

    #155400
    adonisdesigns
    Member
    Post count: 6

    Yup your right. Its looking perfect. Thanks so much.

    #155402
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Great. Thanks Mohammad.
    -Rui

Viewing 10 posts - 1 through 10 (of 10 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