• Resolved Matt Woods

    (@yuuzhan)


    Hi

    I’m trying to add a class to the .goog-te-combo select field but it’s loading the select field after the jQuery code I’m using to add the class is performed even when I’ve placed the jQuery code after the wp_footer();.

    I tried the adding the class if you resize the browser window as a test to see if the add class even works and it did add the class when I resized the window.

    This is the code i’m currently using to add the class to the select field

    jQuery(document).load(function() {
    		jQuery( ".goog-te-combo" ).addClass( "dropdown" );
            });

    https://ww.wp.xz.cn/plugins/google-language-translator/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Matt, the Google Translate tool always loads after jQuery, so it’s pretty much ineffective. I’m not sure how it’s adding the class when you re-size. Interesting.

    In the Premium version I have created a custom function to display the translator along with the page load, so you can grab it immediately and then do what you want with it.

    http://wp-studio.net/product/google-language-translator-premium/

    Hi Matt, I’m closing this out since there’s probably not much I can do to help when trying to use jQuery with the translator, since it loads after all jQuery is loaded. 🙁

    Let me know if I can be of any help with another idea.

    Thanks, Rob

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding class to the select’ is closed to new replies.