The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Jetpack by WordPress.com
[resolved] Jetpack causes Javascript errors on mobile browsers (4 posts)

  1. gavsiu
    Posted 4 years ago #

    I have jQuery and Javascript on my website and Jetpack breaks my webpage when I have Gravatar Hovercards enabled.

    Also stats seems to throw a Javascript error.

    Chrome remote debugging shows this:

    http://domain.com/:35GET http://s.gravatar.com/js/gprofiles.js?aa&ver=3.4.1
    http://domain.com/:143Uncaught ReferenceError: st_go is not defined
    (anonymous function)http://domain.com/:143
    wpgroho.js:27Uncaught ReferenceError: Gravatar is not defined
    (anonymous function)wpgroho.js:27
    http://domain.com/:35GET http://stats.wordpress.com/e-201230.js

    No Javascript errors on desktop Chrome.


  2. Tim Moore

    Plugin Contributor

    Posted 3 years ago #

    Are you using the wp_enqueue_script function to properly add jQuery to your site? If not, that might be what is causing the error.

  3. studioactiv8
    Posted 3 years ago #

    I am getting these errors too:

    TypeError: 'undefined' is not a function (evaluating 'jQuery('body').on')

    TypeError: 'undefined' is not a function (evaluating '$(document).on')

  4. Jeremy Herve
    Jetpack Mechanic
    Plugin Author

    Posted 3 years ago #

    @studioactiv8 This is mostly likely caused by some issues with your theme or one of your plugins.

    If you use an old version of jQuery instead of using the version that comes bundled with WordPress, you might experience a lot of issues with WordPress and with other plugins like Jetpack. You can read more about it here:

    Try switching to a different theme for a few minutes, and check if that solves the issue; if it does, you'll want to look for the function loading jQuery in your theme's header.php file, or in the functions.php file. Once you find that function, you can remove it and enqueue the proper version of jQuery as explained here:

    If the issue is not related to your theme, please try to disable all your plugins, one at a time, until you find the one that causes the conflict. You can then enqueue jQuery using the method I linked to above.

    If you do not feel comfortable editing PHP files, you can also contact the theme or plugin author and ask them to solve the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic