is-a / js /main.js
Kastg
Upload 10 files
6b393b4 verified
raw
history blame contribute delete
805 Bytes
(function ($) {
"use strict";
// Spinner
var spinner = function () {
setTimeout(function () {
if ($('#spinner').length > 0) {
$('#spinner').removeClass('show');
}
}, 1);
};
spinner();
// Back to top button
$(window).scroll(function () {
if ($(this).scrollTop() > 300) {
$('.back-to-top').fadeIn('slow');
} else {
$('.back-to-top').fadeOut('slow');
}
});
$('.back-to-top').click(function () {
$('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo');
return false;
});
// Sidebar Toggler
$('.sidebar-toggler').click(function () {
$('.sidebar, .content').toggleClass("open");
return false;
});
})(jQuery);