
var btn = $('#to-top-btn');
var container = $('.to-top-btn-container');

$(document).ready(function () {
  
    if ($(document).height() < 2000 ) {
        container.hide();
    }

    if ($(window).width() < 480) {
        btn.show();
    }
});


btn.on('click', function (e) {
    e.preventDefault();
    $('html, body').animate({ scrollTop: 0 }, '300');
});
