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 7835975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:54:17+00:00 2026-06-02T13:54:17+00:00

As described on http://api.jquery.com/live/ : As of jQuery 1.7, the .live() method is deprecated.

  • 0

As described on http://api.jquery.com/live/:

As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers.

Right. So instead of

$('.dynamicallyCreatedElement').live('click', function(){
  console.log('click');
});

I should use:

$('.dynamicallyCreatedElement').on('click', function(){
  console.log('click');
});

However it does not bind event to elements created after on() calling. So is it really better live() method ?

Am I missing something ?

  • 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-02T13:54:19+00:00Added an answer on June 2, 2026 at 1:54 pm

    To use on in the same manner as live used to work you need to use it like:

    $(document).on("click", ".dynamicallyCreatedElement", function() {   
        console.log('click'); 
    });  
    

    So you bind the on handler to the document itself (or, actually, the container element where the new wlements will be “appearing” — Thanks to @devnull69 for the clarification), then pass it an event type and the selector.

    You’ll find a couple of examples halfway through the live documentation page.

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

Sidebar

Related Questions

I'm trying to use the example Social Mention RESTful API described here http://code.google.com/p/socialmention-api/wiki/APIDocumentation Simply
I am downloading files through IFRAME method described here: http://encosia.com/2007/02/23/ajax-file-downloads-and-iframes/ And am showing progress
as described in http://developers.facebook.com/docs/api#publishing i want to make a post request to update a
I've seen many posts about the Google Geocoding API, described here: http://code.google.com/apis/maps/documentation/geocoding/ but none
I use in my project a piece of code as described here http://lexandera.com/2009/01/extracting-html-from-a-webview/ I
Google News has API, described here: http://code.google.com/apis/newssearch/v1/index.html But it is a JavaScript API (client
I'm trying to use the google rest api, http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=monkey&rsz=8 as described api spec here
Like described in the docs.. http://download1.parallels.net/Plesk/PP10/10.2.0/Doc/en-US/online/plesk-api-rpc/index.htm?fileName=53497.htm It should be possible to change the home-location
I'm trying to accomplish what is described here: http://sqldev.wordpress.com/2008/05/06/insert-into-temporary-table-from-stored-procedure/ The article says (with support
I don't understand why async as described here http://www.rebol.com/article/0050.html is no more available in

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.