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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:34:12+00:00 2026-06-10T00:34:12+00:00

i get some question how to make if checkbox with id=’paysms’ is cheked ,

  • 0

i get some question how to make if checkbox with id=’paysms’ is cheked , raise all element’s sum with id=’value’ , else default value.

here is the code.

<table class='table'>
<tr>
<th width='80%'>some things</th>
<th width='20%'>price (usd)</th>
</tr>
<tr>
<td width='80%'>thing1</td>
<td width='20%' id='value'>1.00</td>
</tr>
<tr>
<td width='80%'>thing2</td>
<td width='20%' id='value'>2.00</td>
</tr>
<tr>
<td width='80%'>thing3</td>
<td width='20%' id='value'>3.00</td>
</tr>
<tr>
<td width='80%'>thing4</td>
<td width='20%' id='value'>15.00</td>
</tr>
<tr>
<td width='80%' style='border: none; background: none;'></td>
<td width='20%'><label><input id='paysms' type='checkbox'> sms</label></td>
</tr>
</table> 
  • 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-10T00:34:13+00:00Added an answer on June 10, 2026 at 12:34 am

    undefined’s answer doesn’t seem to do exactly what you wanted (from what I understand). I think you get the point by now that IDs must be unique, so heres the javascript:

    $('#paysms').change(function() {
        if ($(this).is(":checked")) {
            $(".value").each(function() {
                $(this).html(parseInt($(this).html()) + 1 + ".00");
            });
        } else {
            $(".value").each(function() {
                $(this).html(parseInt($(this).html()) - 1 + ".00");
            });
        }
    });​
    

    and fiddle: http://jsfiddle.net/EwEZK/3/

    It would need modification if you wanted to have decimal values other than .00, however.

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

Sidebar

Related Questions

So, i have some question about xml Documents in Java. Can i get all
I may get some heat for this question because there are a lot out
I managed to get some help from a previous question and I have the
my question is , I want to get some short and smart ideas to
So, the question is: I get some notifications I don't want to get. But
this is a bit of a newbie question but hoping I can get some
I found some good answers for this question, but I can't really get them
I was wondering if I could get some refactoring help to make this query
Hopefully I can articulate my question well enough to get some clear and usable
I have to make a few request to get some data from third party

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.