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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:59:02+00:00 2026-05-26T21:59:02+00:00

I am trying to use these custom MacOSX-style check boxes on my site (it’s

  • 0

I am trying to use these custom MacOSX-style check boxes on my site (it’s a jQuery plugin), but when I check one, it doesn’t actually trigger the $('#input').is(':checked'); until you uncheck and then it gets messed up.

Whenever you check a box, I add some CSS to the line that is checked to add a yellow background to it. But, I’m having trouble with them. This image explains it below:

enter image description here

I don’t understand why it does this. This is my checkIt() function that adds the yellow background when you check a line:

function checkIt(id) {
    if ($('#checkbox_' + id).is(':checked')) {
        $('#' + id).addClass("selected");
    }
    else {
        $('#' + id).removeClass("selected");
    }
}

And I call this onclick when the checkbox is clicked. Here is some example markup that is generated by the PHP:

<span class="inbox_check_holder">
<input type="checkbox" value="96874" onclick="checkIt(96874)" id="checkbox_96874" class="inbox_check" />
<div class="star_clicker" id="star_96874" onclick="addStar(96874)" title="Not starred"><span id="starimg_96874" class="not_starred"></span></div>
</span>

I’m thinking it is something to do with this custom checkbox jQuery plugin adding in extra elements over the <input />.

Here’s the jQuery checkbox plugin page if you need to see it, they have tons of examples on it. (Obviously) I am using the “Safari” skin.

  • 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-26T21:59:02+00:00Added an answer on May 26, 2026 at 9:59 pm

    try

    $(".inbox_check").live("change",function(e){
    e.stopPropagation();
    if($(this).is(":checked"))
     $('#' + id).addClass("selected");
    else
     $('#' + id).removeClass("selected");
    });
    

    http://jsfiddle.net/BXjg7/3/

    with jquery 1.7 you can use on

    $("body").on("change", ".inbox_check", function(e){
            e.stopPropagation();
        if($(this).is(":checked"))
         $('#' + id).addClass("selected");
        else
         $('#' + id).removeClass("selected");
    });
    

    http://jsfiddle.net/BXjg7/10/

    delegate example

    $("body").delegate(".inbox_check","change", function(e){
    e.stopPropagation();  
        if($(this).is(":checked"))
         $('#' + id).addClass("selected");
        else
         $('#' + id).removeClass("selected");
    });
    

    http://jsfiddle.net/BXjg7/15/

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

Sidebar

Related Questions

I'm trying to use the JQuery tools tooltips plugin in a site that I'm
I'm using PhoneGap and JQuery Mobile. I'm trying to use custom button icons. I
So I'm trying to use these CSS3 buttons taken from: http://lab.simurai.com/buttons/ Here is the
I am trying to use the peek function in Visual Studio 2010 with these
I'm trying to use a MySQL database to save player information, but whenever there
I am trying to use this code in my QT app QMap<QString,QMap> but there
I'm trying to figure out if there's a way to use jquery's slideDown/slideUp/slideToggle functions
I'm trying to convert an mp3 to an flv for use in a custom
I'm trying to build this class (to use in ASP.NET site) that will Crop
We're trying to implement formsAuthentication on our site, but in a scenario that we

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.