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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:36:15+00:00 2026-06-03T21:36:15+00:00

I have an click even handler on a dom element. jQcurrentOption.click(function () { //IMPLEMENTATION

  • 0

I have an click even handler on a dom element.

jQcurrentOption.click(function () {
 //IMPLEMENTATION
});

When this element is cloned .cloneNode(true) it loses its event handler :(. I know that I can change the jQuery (note I am still using 1.4.4 hence live and not bind(1.7+))

jQcurrentOption.live("click",function(){
 //IMPLEMENTATION
});

However I was curious if there was a way to retain these handlers without defining them with live (or bind). Sometimes I don’t have the benefit of using jQuery to apply 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-03T21:36:16+00:00Added an answer on June 3, 2026 at 9:36 pm

    Have you tried jQuery’s clone()?

    var $clone = jQcurrentOption.clone(true);
    

    It clones the event handlers if you pass true as an argument.


    Apart from that, jQuery 1.4.4 supports delegate(), which is equivalent to 1.7’s on():

    $("select").delegate("option.current", "click", function () {
     //IMPLEMENTATION
    });
    

    This way your individual elements don’t need to copy event handlers.


    Just to make a point: Even though delegate() is deprecated with as of 1.7, it really is the same thing as the more modern on(), the only difference being the argument order. Here’s the current implementation (1.7.2):

    delegate: function( selector, types, data, fn ) {
      return this.on( types, selector, data, fn );
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

THis is what i currently have click = false; if click $(el).on('click', 'li', {})
I have a click handler, which has event.preventDefault. There is whole lot of logic
I have to click on the button which has id . But this id
Ok, what I am after is quite simple. I have click handler for multiple
i have a link with a click handler here. the href is filled with
I have added an EventHandler for the Click-event to a picturebox but on runtime
i have a click event for $('#blah div'). div has text inside of it
I have two click-events, that are nearly similar, but not quite. I am wondering
I have a website where I have to click a submit button on a
On page1.php I have a click event that causes the user to be redirected

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.