Google 翻译正在破坏我的移动菜单中子导航元素中的链接。当我将鼠标悬停在项目上时,我会看到链接,但是当我点击时,什么也没有发生。我在检查代码时看到谷歌翻译在元素周围放置了一系列标签,所以这可能是导致它的原因吗?我如何解决它?这是我使用的谷歌翻译代码:
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'zh-CN,zh-TW,en,tl,ja,ko,es,vi', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); } </script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<style>
iframe.goog-te-banner-frame{ display: none !important;}
body {position: static !important; top:0px !important;}
.goog-te-gadget-simple .goog-te-menu-value span { text-decoration: none!important; font-family: 'ubuntulight'!important; font-size: 14px!important; color: #ffffff!important; padding-right: 5px!important;}
.goog-te-gadget-simple{background-color: transparent !important; border: none !important;;}
.goog-te-gadget img {display: none!important; }
.goog-tooltip { display: none !important; }
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }
.goog-te-gadget-simple .goog-te-menu-value {text-decoration: none!important; }
</style>
<div style="float: right!important; padding-top: 1.5px!important;" id="google_translate_element"></div>
这是它所在的页面 http://www.sosc.org/crabfeed
我发现另一个帖子建议使用类似的方法来修复它,但我无法让它工作
<script>
$(document).ready(function () {
$(".menufication-child-menu.menufication-menu-level-1 li").on("click", function (event) {
location.href = $(this).parent().parent().attr("href");
});
});
</script>