bnbweb/themes/vr/web/js/google.js

20 lines
593 B
JavaScript
Raw Permalink Normal View History

2022-11-14 15:49:28 +00:00
// 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});
});
});