jQuery(document).ready(function($) { // 定义目标元素的类名组合 // const targetClasses = 'elementor-item elementor-item-anchor has-submenu'; // // 创建观察器实例 // const observer = new MutationObserver(function(mutations) { // // 尝试查找元素 // const $targetLinks = $(`a.${targetClasses.replace(/ /g, '.')}`); // if ($targetLinks.length > 0) { // // 找到元素时移除类并停止观察 // $targetLinks.removeClass('elementor-item'); // $targetLinks.css({ // 'padding': '0' // }); // observer.disconnect(); // } // }); // // 配置观察选项:监听整个文档的子元素变化 // observer.observe(document.documentElement, { // childList: true, // subtree: true // }); // var currentUrl = window.location.href; // // 只处理以 '/de/' 开始的URL // if (currentUrl.indexOf('/de/') !== -1) { // // 隐藏特定的四个
  • 元素 // $('.post-3043, .post-2981, .post-2900, .post-3571').hide(); // } });