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

  • Home
  • SEARCH
  • 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 9170179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:58:52+00:00 2026-06-17T15:58:52+00:00

My web framework automatically updated my jQuery script to the current last version, the

  • 0

My web framework automatically updated my jQuery script to the current last version, the 1.9.

Now all my:

$(".myclass").live("click", function() {...

don’t work anymore. I mostly used it with some ajax called which filled html in my page.

I would know how to replace this functionnality in the last version. A friend told me to use “on” instead, but the “on” stays fixed on the same element.

Explanation, in this example (no ajax), I use a “+” icon, to display an “ul li list”.

$(".closed").live('click', function(){
    $("#ul_list_"+$(this).attr('id')).addClass("displayed").removeClass("hidden").show();
    $(this).addClass("openned").removeClass('closed');
    $(this).html('<i class="icon-minus"></i>');
});

$(".openned").live('click', function(){
    $("#ul_list_"+$(this).attr('id')).addClass("hidden").removeClass("displayed").hide();
    $(this).addClass("closed").removeClass('openned');
    $(this).html('<i class="icon-plus"></i>');
});

(I know that the script is not the most optimized ever, but it worked. I used classes to open or close my lists. And if the visitor doesn’t have JS enabled, nothing is hidden, all the folded lists are opened)

Notes:

  • I’ve tried https://github.com/jquery/jquery-migrate, but the only message that I have is “JQMIGRATE: jQuery.fn.live() is deprecated”, not how to fix it.
  • 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-17T15:58:52+00:00Added an answer on June 17, 2026 at 3:58 pm

    The docs already provide an example:

    Rewriting the .live() method in terms of its successors is
    straightforward; these are templates for equivalent calls for all
    three event attachment methods:

    $(selector).live(events, data, handler); // jQuery 1.3+
    $(document).delegate(selector, events, data, handler); // jQuery 1.4.3+
    $(document).on(events, selector, data, handler); // jQuery 1.7+
    

    So: $(document).on("click", ".closed", function() { ... }).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do convert effort estimate say in function points to a specific web framework
In Apache Wicket web framework every component returns false from getOuputMarkupId() by default .
Is there a Java web framework that allows the user to create custom fields,
I want to write a simple web framework myself using WSGI, Python. I am
I am developing open source web framework, it's almost ready but I still do
Does anybody know a good web framework that includes an ORM mapper and allows
I plan to start learning a Java web framework (I love the Java API)
I'm looking for a java web framework that will allow you to configure dynamic
Possible Duplicate: Why do we need apache under Node.js express web framework? I wonder
I'm a python newbie and starting out with using the Bottle web framework on

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.