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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:37:17+00:00 2026-06-15T01:37:17+00:00

i have three checkboxes in HTML <input type=checkbox id=a1/> <input type=checkbox id=a2 /> <input

  • 0

i have three checkboxes in HTML

<input type="checkbox" id="a1"/>
<input type="checkbox" id="a2" />
<input type="checkbox" id="a3" />
<span class="price"></span>

I want to do this:
If id A1 is checked, change text in span to priceUp.
If ids A1 and A2 is checked, change text in span to priceDown.
If ids A1,A2 and A3 is checked, change text in span to priceNormal.

  • 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-15T01:37:18+00:00Added an answer on June 15, 2026 at 1:37 am

    Try this

    $('#a1 ,#a2 , #a3').on('click' , function(){
        var $a1Check  = $('#a1').is(':checked');
        var $a2Check  = $('#a2').is(':checked');
        var $a3Check  = $('#a3').is(':checked');
        var text = '' ;
        if( $a1Check && $a2Check && $a3Check){
            text = 'priceNormal';
        }
        else if($a1Check && $a2Check){
              text = 'priceDown';
        }    
        else if($a1Check)  {
            text = 'priceUp';
        }        
    
        $('.price').html(text);
    });
    

    Check Fiddle

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

Sidebar

Related Questions

i have this html code: <label class=checkbox id=check_rem0> Checkbox <input type=checkbox disabled=disabled id=form_checkbox_0> </label>
I have some HTML like this: <div id=SomeID> <div class=Wrapper> <input type=checkbox class=SomeCheckboxClass> <input
I have an html form with a checked checkbox: <input type=checkbox name=somebox value=somevalue checked
Hi i have this html code: <input type=checkbox id=button2> <label for=button2>something here</label> So the
I have a HTML snippet like the following <tr class=new> <td> <input name=id type=checkbox/>
I have HTML in the following form: <div id=filters> <ul> <li><label class=checkbox><input type=checkbox value=
I have this Jquery: $(document).ready(function() { $('#masterChecks input[type=checkbox]').click(function() { var togClass=$(this).attr('class'); if($(this).attr('checked')){ //need to
I have the following code: $(input[id^='Order_'], input[id^='Default_']) .change(function (e) { var type = $(this).attr('id').split('_')[0];
I have a html checkbox <input type=checkbox name=MyChkBox .. /> There is another control
I've made some pretty checkboxes using some pretty simple jQuery HTML <span class=iconElement checkBox

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.