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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:27:17+00:00 2026-06-17T00:27:17+00:00

I have this simple code. http://jsfiddle.net/borth/BmEZv/ If you click on the link once, it

  • 0

I have this simple code. http://jsfiddle.net/borth/BmEZv/
If you click on the link once, it works fine. If you click on it a second time, it doesn’t work. Due to the html being loaded into html after the DOM has loaded, I’ve tried .on, .bind, .delegate, and .live. No of them work except for .live which is being deprecated (I’m using jquery 1.7.2).

Can someone explain why .live is the only function that works and why the others don’t work (or if I am doing something wrong with the other functions).


$(document).ready(function(){
  $(".OpenPopup").bind('click', function(e){
      alert('test .OpenPopup');
      // do something
      return false;
  });
  $(".EditIcon").bind('click', function(){
      alert('test .EditIcon');
      // do something
      $("#ABC").html('<div class="EditIcon OpenPopup" pwidth="800" pheight="500" ptitle="EditText">click here again</div>');
  });
});


<div id="ABC"><div class="EditIcon OpenPopup" pwidth="800" pheight="500" ptitle="EditText">click here</div></div>
  • 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-17T00:27:19+00:00Added an answer on June 17, 2026 at 12:27 am
    $(document).ready(function(){
            $(document.body).on('click', ".OpenPopup", function(e){
                alert('test .OpenPopup');
                // do something
                return false;
            });
            $(document.body).on('click', ".EditIcon", function(){
                alert('test .EditIcon');
                // do something
                $("#ABC").html('<div class="EditIcon OpenPopup" pwidth="800" pheight="500" ptitle="Edit Text">click here again</div>');
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple code like this http://jsfiddle.net/9braK/2/ $(function(){ $('body').append( $("<a/>").attr({ "id": "foo", "href":"#"
I have this code: http://jsfiddle.net/Q4PUw/2/ Hence, a simple HIDDEN TO VISIBLE jQuery Script. What
I have this pretty simple jquery example: http://jsfiddle.net/clifgray/NTd95/1/ and in that jsfiddle it works
i have this simple code http://jsfiddle.net/U4Fj9/ the index of the visible image is always
I have this simple code, using Joda-time. Works fine, but I have a problem.
All of this is code is here: http://jsfiddle.net/yrgK8/ I have a news section which
I have the following simple code: http://jsfiddle.net/QUBCq/ You can see that I have 3
My question is simple. First off, take a look at this code: http://jsfiddle.net/Jk8Nr/ All
I have this code http://jsfiddle.net/xNHKP/6/ (not working in the fiddle for some reason which
I have this simple code where I am sending http request and reading all

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.