Title: Fatal JavaScript error from using .live() function removed in jQuery 1.9 w/ fix
Last modified: September 15, 2017

---

# Fatal JavaScript error from using .live() function removed in jQuery 1.9 w/ fix

 *  Resolved [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/)
 * I updated my site to v5.0.32 of Google Language Translator and found that all
   of my site’s JavaScript stopped working. I then found a fatal JavaScript error
   relating to this plugin that’s in the footer. The fatal issue was the fact that
   the script was using the .live() jQuery function that was deprecated in jQuery
   1.7 and removed in jQuery 1.9. I’m now using jQuery 1.12.4 on my site so this
   was a very serious issue.
 * The fix was to edit the `wp-content/plugins/google-language-translator/google-
   language-translator.php` file so that
 *     ```
       $("a.flag").live("click"
       ```
   
 * is instead set to
 *     ```
       $("a.flag").on("click"
       ```
   
 * currently on `line 350` of that file. This should be supported by any site with
   jQuery 1.7 or newer (which was released nearly 6 years ago, now).
 * Please update this in the next version so that those using a version of jQuery
   that isn’t over half a decade old don’t have the JavaScript on their site break.
   Also, you might be able to still check for the existence of the .on function 
   if you still want to support jQuery versions older than 1.7.

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

 *  [Rob Myrick](https://wordpress.org/support/users/rm2773/)
 * (@rm2773)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9501050)
 * Thanks [@kzeni](https://wordpress.org/support/users/kzeni/)! I will update this
   here again soon. I missed this as a deprecated function.
 * Thanks, Rob
 *  [Rob Myrick](https://wordpress.org/support/users/rm2773/)
 * (@rm2773)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9501080)
 * Hi [@kzeni](https://wordpress.org/support/users/kzeni/)! I updated to fix this
   issue. Thanks!
 *  Thread Starter [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9501114)
 * Thanks for the fast fix!
 *  [ajumbra](https://wordpress.org/support/users/ajumbra/)
 * (@ajumbra)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9525022)
 * We have the same issue and we just upgraded our site – we have the latest version
   of WP and the latest version of this plugin. Can you check it again with the 
   WP version 4.8.2 that was just released? We had to deactivate your plugin because
   it broke our site.
 *  Thread Starter [KZeni](https://wordpress.org/support/users/kzeni/)
 * (@kzeni)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9529401)
 * I just grabbed a download of the plugin’s current version (5.0.33) direct from
   [https://wordpress.org/plugins/google-language-translator/](https://wordpress.org/plugins/google-language-translator/),
   and a search through all of the plugin’s files shows that there are 0 instances
   of `.live` being used as they’ve all been switched to `.on`.
 * I’m not sure what the problem you’re having with the plugin, [@ajumbra](https://wordpress.org/support/users/ajumbra/),
   but maybe you should start a new support topic as the issue being discussed in
   this topic has verifiably been resolved.
    -  This reply was modified 8 years, 8 months ago by [KZeni](https://wordpress.org/support/users/kzeni/).

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

The topic ‘Fatal JavaScript error from using .live() function removed in jQuery 
1.9 w/ fix’ is closed to new replies.

 * ![](https://ps.w.org/google-language-translator/assets/icon-256x256.png?rev=3007649)
 * [Translate WordPress - Google Language Translator](https://wordpress.org/plugins/google-language-translator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-language-translator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-language-translator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-language-translator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-language-translator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-language-translator/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [KZeni](https://wordpress.org/support/users/kzeni/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/fatal-javascript-error-from-using-live-function-removed-in-jquery-1-9-w-fix/#post-9529401)
 * Status: resolved