You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
801 B
30 lines
801 B
// 桌面端窗口自适应
|
|
window.onresize = () => {
|
|
if ($(window).width() >= 768) {
|
|
$('.button-group button.active').click();
|
|
}
|
|
};
|
|
// 笔记分类
|
|
let $grid_note = $('.note-list').isotope({
|
|
itemSelector: '.note-grid',
|
|
});
|
|
$('.note-menu').on('click', 'button', function () {
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
let filterValue = $(this).attr('data-filter');
|
|
$grid_note.isotope({
|
|
filter: filterValue,
|
|
});
|
|
});
|
|
|
|
// API分类
|
|
let $grid_api = $('.api-list').isotope({
|
|
itemSelector: '.api-grid',
|
|
});
|
|
$('.api-menu').on('click', 'button', function () {
|
|
$(this).addClass('active').siblings().removeClass('active');
|
|
let filterValue = $(this).attr('data-filter');
|
|
$grid_api.isotope({
|
|
filter: filterValue,
|
|
});
|
|
});
|
|
|
|
|