Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9129331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:43:17+00:00 2026-06-17T07:43:17+00:00

I recently updated jQuery from 1.8 to 2.1. I suddenly discovered that the .live()

  • 0

I recently updated jQuery from 1.8 to 2.1. I suddenly discovered that the .live() stops working.
I get the error TypeError: $(...).live is not a function.

Is there any method I can use in place of .live()?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:43:18+00:00Added an answer on June 17, 2026 at 7:43 am

    jQuery .live() has been removed in version 1.9 onwards

    That means if you are upgrading from version 1.8 and earlier, you will notice things breaking if you do not follow the migration guide below. You must not simply replace .live() with .on()!


    Read before you start doing a search and replace:

    For quick/hot fixes on a live site, do not just replace the function live with on,
    as the parameters are different!

    .live(events, function)
    

    should map to:

    .on(eventType, selector, function)
    

    The (child) selector is very important! If you do not need to use this for any reason, set it to null.


    Migration Example 1:

    before:

    $('#mainmenu a').live('click', function)
    

    after, you move the child element (a) to the .on() selector:

    $('#mainmenu').on('click', 'a', function)
    

    Migration Example 2:

    before:

    $('.myButton').live('click', function)
    

    after, you move the element .myButton to the .on() selector, and find the nearest parent element (preferably with an ID):

    $('#parentElement').on('click', '.myButton', function)
    

    If you do not know what to put as the parent, document always works:

    $(document).on('click', '.myButton', function)
    

    See also:

    • jQuery – how to use the “on()” method instead of “live()”?
    • jQuery 1.9 Migration Guide
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently updated Twisted from 11 to 12 version. Discovered that the twisted.enterprise.util module no
I've recently updated to Selenium 2.24.1 to get Firefox 13 working. With this update
We recently updated jQuery from 1.4.2 to 1.6.1, and jQueryUI from 1.8.4 to 1.8.12.
I have recently updated jQuery from 1.6 to 1.7 and the following has stopped
So I have been working on this phone gap application that uses jquery-mobile. Recently,
I recently updated from MVC4 beta to the RC and have encountered a small
I recently updated a rails app from 3.0.4 to 3.2.4 and I have a
I recently updated an application from VS2003 to VS2008 and I knew I would
I recently updated jasperreport version from 3.5.2 to 4.0.2 and noticed a few changes
I've tried a veriety of jQuery plugins recently and I keep getting this error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.