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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:56:25+00:00 2026-06-11T10:56:25+00:00

I am searching for a script that makes a action when a few checkboxes

  • 0

I am searching for a script that makes a action when a few checkboxes are clicked.
I found the following script that works great for only one checkbox:

<input type="checkbox" name="foo" value="bar" class="checkIt"/>Name <br/>

<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
    $('.checkIt').bind('click', function() {
        if($(this).is(":checked")) {
          alert('Everything checked')
        } else {
            alert('I think you have missed some boxes!');
        }
    });
</script>

But now I want more checkboxes and I have no idear how to managing that. So When 10 checkboxes are clicked there are happening something!
Would be great if you can help me.
My other questions is, that I want istead of a js alert, to show up a image at a specific position if all boxes are checked. is this possible ?
THANKS A LOT!!


EDIT:
great guys!!
ok sorry but the code from the guy before was workig well:

    <input type="checkbox" name="foo" value="bar" class="checkIt"/>Name <br/>
    <input type="checkbox" name="foo" value="bar" class="checkIt"/>Name <br/>
        <input type="checkbox" name="foo" value="bar" class="checkIt"/>Name <br/>
            <input type="checkbox" name="foo" value="bar" class="checkIt"/>Name <br/>

<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
$('.checkIt').bind('click', function() {

    var $boxes = $('.checkIt');
    var boxesLength = $boxes.length;
    var checkedCount = $boxes.filter(':checked').length;
    if( boxesLength == checkedCount) {
       alert("hello");
    }
});


</script>

no I search for a image that appears, instead of the alert!

  • 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-11T10:56:26+00:00Added an answer on June 11, 2026 at 10:56 am

    check my demo here

     $(".checkIt").change(function(){ 
        if ($('.checkIt:checked').length == $('.checkIt').length) {
           $("#imgloc").show();
        } else {
            $("#imgloc").hide();
        }
    });​
    

    Updated to hide image when checkboxes are unchecked, Updated Demo

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

Sidebar

Related Questions

I was searching for a drop down list script that auto-updates the content below
Searching here I found that this question was already asked , but I think
Searching online, I have found the following routine for calculating the sign of a
I have this script. I need is so that it only writes the links
I found an nice script while searching and inspecting the elements of some websites.
I've made a very small ruby script today that makes use of regexes to
Firstly, let me say that I've been searching the Internet, rewriting scripts and I
Searching around I haven't found any recent answers to this question. The other answers
Searching for values that uses the same value Example SELECT Name, UnitPrice, Quantity, Color
I am maintaining a Python script that uses xlrd to retrieve values from Excel

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.