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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:23:59+00:00 2026-05-16T06:23:59+00:00

I have a problem that has been consuming me for days. I have a

  • 0

I have a problem that has been consuming me for days.

I have a div and the div has a style for it to be hidden ( .copy { display: none; } ).

I have a link (Add new) that when clicked, makes a clone of that div and removes the class “copy”, causing the div to appear.

Inside this div, I have 4 checkbox and a text input. Clicking this checkbox, the values are displayed in this input text.

When I click once on “Add New”, he makes sure, but if I click a second time on the link “Add New” it shows all the checkbox values in the second input of the div, if I click again on “Add New” he starts to put the values in the input of the third div …

It’s complicated to explain, I do not know if I’m being clear, but put the example in jsbin http://jsbin.com/eteyu3.

See:

Click the “Add New” only once and then click the checkbox. Then click “Add New” again and see that it stops working right.

I wish he would just show the values of the div corresponding checkbox.

  • 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-16T06:24:00+00:00Added an answer on May 16, 2026 at 6:24 am

    http://jsbin.com/eteyu3/2

    I changed it this way and it works now.

    jQuery(document).ready(function() {
      var $current = jQuery(this);
    
      jQuery(".add_new").bind("click", function() {
        var copy = jQuery(".copy").clone().insertBefore(".copy").removeClass("none").removeClass("copy");
        jQuery("input:checkbox", copy).click(function() {
          var val = [];
          jQuery(':checkbox:checked', copy).each(function(i) {
            val[i] = jQuery(this).val();
          });
    
          jQuery(".resultfinal", copy).val ( val );
        });
    
        jQuery(".count").val( jQuery(".opt:not(.copy)").length );
      });  
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that has been driving me batty. I have code that
I have a problem with IE. I have a layer that has this style
This problem has been kicking my butt for a few days now. I have
I have problems setting the focus on an input element that has been created
I have a tricky problem that has had me scratching my head for a
I have a really silly problem that has cost me a load of time
I have the problem that my view controller class has too many delegates and
The problem: we have one application that has a portion which is used by
Screenshot mockup: http://tinypic.com/r/y2qex/5 Problem: I have a table that has 53 columns; one for
So I have a strange problem, I have a java swing application that has

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.