Smooth scrolling

Professionally designed and responsive events Joomla template to launch your event based website.
GK User
Wed Jul 15, 2015 12:02 pm
Hi!
I've added anchor link on the main page to contacts-module: http://xn--80abab7as7j.xn--p1ai/
I also added the following code
to gk.scripts.js
Code: Select all
$('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        || location.hostname == this.hostname) {

        var target = $(this.hash);
        target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
        if (target.length) {
            $('html,body').animate({
                scrollTop: target.offset().top
            }, 1000);
            return false;
        }
    }
});


But it still doesn't scroll smoothly. Where is the problem?
User avatar
Fresh Boarder

GK User
Fri Jul 17, 2015 8:30 am
Hi @wildkat
Please check this out: https://www.gavick.com/updates?task=upd ... 07&catid=4
6. Smooth scroll improvements


Update and have fun! :mrgreen:
User avatar
Platinum Boarder


cron