zxf/js/main.js

30 lines
750 B
JavaScript
Raw Normal View History

2023-10-04 17:06:26 +08:00
let isClose = true;
function showMenu() {
$('.menu-group').show().addClass('fadeIn');
$('.menu-mask').show().addClass('fadeIn');
$('.btn-img').attr('src', '/images/guanbi.png');
isClose = false;
}
function hideMenu() {
$('.menu-group').removeClass('fadeIn').hide();
$('.menu-mask').removeClass('fadeIn').hide();
$('.btn-img').attr('src', '/images/menu.png');
isClose = true;
}
2023-09-26 17:55:52 +08:00
$(function () {
2023-09-28 17:06:54 +08:00
$('.header').load('/common/header.html');
$('.footer').load('/common/footer.html');
2023-10-04 17:06:26 +08:00
$('.header').on('click', '.menu-btn', function () {
(isClose == true) ? showMenu() : hideMenu();
});
$('.header').on('click', '.menu-mask', function () {
hideMenu();
});
2023-09-27 00:33:44 +08:00
new WOW().init();
2023-09-28 17:06:54 +08:00
});