src/main/webapp/resources/js/custom.js
(完整代码) 1KB(function ($) {
"use strict"; // Start of use strict
$('#sidebarCollapse').on('click', function () {
$('#sidebar').toggleClass('active');
$(this).toggleClass("ti-control-skip-backward ti-control-skip-forward");
});
/*Loader Javascript
-------------------*/
var window_var = $(window);
window_var.on('load', function () {
$(".loading").fadeOut("fast");
});
// scroll to top
$(window).on('scroll',function () {
if ($(this).scrollTop() > 50) {
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
}
});
// scroll body to 0px on click
$('#back-to-top').on('click', function () {
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
// scroll to top End
// theme color change
var theme_settings = $(".theme-settings").find(".theme-color");
theme_settings.on('click', function () {
var val = $(this).attr('data-color');
$('#style_theme').attr('href', 'css/' + val + '.css');
$(".logo-change").attr('src', 'img/logo-' + val + '.png');
theme_settings.removeClass('theme-active');
theme_settings.addClass('theme-active');
return false;
});
$(".theme-click").on('click', function () {
$("#switcher").toggleClass("active");
return false;
});
// theme color change End
// fullscreen function
$(".fullscreen").on('click', function () {
if (document.webkitCurrentFullScreenElement == null) {
document.documentElement.webkitRequestFullScreen();
} else {
document.webkitCancelFullScreen();
}
});
// fullscreen function End
})(jQuery);
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
