bnbweb/themes/vr/web/js/google.js
2022-11-15 01:31:15 +08:00

20 lines
574 B
JavaScript
Executable File

// JavaScript Document
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'zh-TW',
includedLanguages: 'en,ja,ko,th,zh-CN,zh-TW',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE},
'google_translate_element'
);
}
$(function(){
$('.toggleTrans').click(function(){
var offsetT = $(this).offset().top;
var offsetL = $(this).offset().left;
var h = $(this).outerHeight();
var scrollTop = $(window).scrollTop();
$('.goog-te-menu-frame').eq(0).toggle().css({top:offsetT-scrollTop+h, left:offsetL});
});
});