Newer
Older
wg-portal / assets / js / custom.js
@Christoph Haas Christoph Haas on 6 Nov 2020 507 bytes initial commit
(function($) {
    "use strict"; // Start of use strict

    // Smooth scrolling using jQuery easing
    $(document).on('click', 'a.scroll-to-top', function(e) {
        var $anchor = $(this);
        $('html, body').stop().animate({
            scrollTop: ($($anchor.attr('href')).offset().top)
        }, 1000, 'easeInOutExpo');
        e.preventDefault();
    });

})(jQuery); // End of use strict

function OnSearch(input) {
    if(input.value === "") {
        window.location = "/?search=";
    }
}