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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:00:13+00:00 2026-05-18T03:00:13+00:00

I have an HTML table in which the first column’s cells each contain a

  • 0

I have an HTML table in which the first column’s cells each contain a check box with a class ‘myClass’. I have also put a checkbox into this column’s header cell, and I want it to work so that checking or unchecking the header cell sets or unsets all the row checkboxes too. I have this code in the header checkbox’s click handler:

if (jQuery(event.target).attr('checked') === true) {
    alert(jQuery('td .myClass:enabled').length);
    jQuery('td .myClass:enabled').attr('checked', 'checked');
} else {
    alert(jQuery('td .myClass:enabled').length);
    jQuery('td .myClass:enabled').removeAttr('checked');
}

Three rows have enabled checkboxes and five disabled ones.

The code works fine in IE8, FF3.6 and Chrome 7.0. However, in Opera 10.63 the first time I check the header cell all eight rows get checked. Subsequently the code works as expected.

The alert statements confirm this, showing ‘3’ every time except the first.

Is this an Opera bug? If so, is there a workaround?

  • 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-18T03:00:13+00:00Added an answer on May 18, 2026 at 3:00 am

    Strange synchronisity – I’ve just analysed a bug report I think is the same issue a couple of hours ago 🙂

    Yes, this is probably a bug where Opera fails to apply the pseudo-class enabled correctly on elements that were created in the DOM and later inserted into the document.

    It may be an acceptable workaround to use class names instead of :enabled. Or inverse .checked property twice on all checkboxes from onload, perhaps? It sounds like toggling the disabled or checked status back and forth will make Opera handle this fine.

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

Sidebar

Related Questions

I have a html table in which each line ( <tr> ) represents a
I have a HTML table where the first column is a checkbox, I have
I have HTML table with 10 rows and which has a Current Value column
I have a simple HTML table which is bound using knockoutJS. However, I've added
I have a table in HTML which has three columns i.e Error - User
I have a html page which consist of a table & I want to
I am creating one form in html using table. Which have one Drop down
I have the following html structure (which is generated and I can't change): <table
I have the following code which creates a new table. var html = '<table>';
I have HTML table. I'm looping through table and iterate over each row whose

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.