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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:43:25+00:00 2026-05-31T17:43:25+00:00

When using jQuery.load to dynamically load HTML content into a webpage, what is the

  • 0

When using jQuery.load to dynamically load HTML content into a webpage, what is the best way to “rebind” any handlers?

Normally you bind handlers in jQuery.ready, but they obviously don’t work on newly loaded content. This is for handlers used both outside and inside the loaded content, so just binding them in the load success function is not really nice.

  • 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-05-31T17:43:26+00:00Added an answer on May 31, 2026 at 5:43 pm

    When subscribing to those handlers you could use the .on function which allows you to subscribe to even non existing yet DOM elements and when they are added the subscription will be done. The .on function was introduced in jQuery 1.7. If you are using an older version you could use the .delegate function to achieve the same effect which was introduced in jQuery 1.4.2. And if you are using an even older version you could use the .live method.

    Here’s an example of how you could subscribe to the click event of some element (existing or not yet existing that will be added in the future):

    $('#someParentElement').on('click', '#someElement', function() {
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was using jQuery.load() to load a html page's content into a lightbox. The
Is there a way I can load content dynamically using ajax and retain any
I'm using jQuery 1.5.2 trying to dynamically load a div from one source into
I am using jQuery to load a page by AJAX using $.ajax (suppose test.html).
We are using jquery to .load() a form into a div We then use
I'm using JQuery to load the content of an MVC usercontroll: function menuShowModal(a) {
I'm using jQuery to dynamically add two divs on page load. It all works
Across my application, I need to load a content block into a jQuery UI
I'm using the following code to load the pages dynamically with jQuery. The page
I have used a tutorial http://www.devcurry.com/2010/06/load-page-dynamically-inside-jquery-ui.html to dynammically load an aspx page into a

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.