• Resolved arentsen

    (@arentsen)


    The GTranslate dropdown no longer works on the published site. It does work when I load the customizer, but outside of that, I get the error: “Uncaught TypeError: jQuery(…).click is not a function at (index):705:31”.

    Line 705 says: jQuery(‘.switcher .selected’).click(function() {jQuery(‘.switcher .option a img’).each(function() {if(!jQuery(this)[0].hasAttribute(‘src’))jQuery(this).attr(‘src’, jQuery(this).attr(‘data-gt-lazy-src’))});if(!(jQuery(‘.switcher .option’).is(‘:visible’))) {jQuery(‘.switcher .option’).stop(true,true).delay(100).slideDown(500);jQuery(‘.switcher .selected a’).toggleClass(‘open’)}});

    Any insight would be much appreciated!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    It seems that you are using some optimization plugin which is deferring jQuery library loading to the end of your theme. jQuery is required by GTranslate plugin and we call the default WordPress jQuery library to be loaded, however the loading is being delayed.

    You either need to stop deferring the library or use a better optimization tool to properly handle javascripts which rely on jQuery library. If you can provide more info about the optimization tool you are using I will try to find a solution, since I see more users are having similar issues.

    I recommend adding Cloudflare’s free service for your website and enable Cloudflare’s Rocket Loader, which will handle it correctly.

    Thanks! ??

Viewing 1 replies (of 1 total)
  • The topic ‘jquery click is not a function’ is closed to new replies.