This commit is contained in:
2026-06-22 00:43:05 +08:00
parent d074a80cac
commit acae35700e
15 changed files with 31931 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
/*
* SewJoy Theme - Main JavaScript
*/
(function ($) {
'use strict';
// Log on load
console.log('SEWJOY THEME 已加载');
// Document-ready functionality
$(function () {
// Smooth scroll for in-page anchors
$('a[href*="#"]:not([href="#"])').on('click', function (event) {
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top - 60
}, 600);
}
});
// Highlight current menu item visually
$('.main-navigation li.current-menu-item, .main-navigation li.current_page_item')
.addClass('active');
});
})(jQuery);