Hi everyone,

I have a site with fixed header at the top. Google translate also
positions itself at the top of the page and it sits on top of my
header.


Is there a callback function to use for google translate in order to
move my header 40px below?





Maybe something like:

<pre><code>
            <div id="google_translate_element"></div><script>
            function googleTranslateElementInit() {
              new google.translate.TranslateElement({
                pageLanguage: 'en',
                includedLanguages: 'nl,en,fr,de,it,es',
                layout:
google.translate.TranslateElement.InlineLayout.SIMPLE
              }, 'google_translate_element');


            }

            // Move header 40px down on click
            $("body").delegate(".goog-te-menu2-item", "click",
function(){
                 var element = document.getElementById('site-header');
                 element.style.top = "40px";
            });


            $("body").delegate(".goog-close-link", "click", function()
{
                 var element = document.getElementById('site-header');
                 element.style.top = "0px";
            });

            </script><script src="//translate.google.com/translate_a/
element.js?cb=googleTranslateElementInit"></script>

</code></pre>

-- 
You received this message because you are subscribed to the Google Groups 
"General" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-translate-general?hl=en.

Reply via email to