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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:47:19+00:00 2026-06-01T02:47:19+00:00

I am having issues clicking the area in the span where the disabled checkbox

  • 0

I am having issues clicking the area in the span where the disabled checkbox is. I read that the best way to get around not being able to click a disabled checkbox is to wrap it in a span.

Not sure what I am doing wrong. (probably something simple).
Broken JS Fiddle

<ul class="field">
  <li><span>Test A <label for="id_check1">Check 1</label>: 
       <input checked="checked" type="checkbox" value="1" id="id_check1" /></span></li>

  <li><span>Test B <label for="id_check2">Check 2</label>: 
       <input checked="checked" type="checkbox" value="2" id="id_check2" /></span></li>

  <li><span>Test D <label for="id_check3">Check 3</label>: 
     <input checked="checked" type="checkbox" value="3" id="id_check3" disabled="disabled" /></span></li>
</ul>


$('li').delegate('span', 'click', function(event) {
    alert('clicked');
    #this is here bc the real example has anchors
    event.preventDefault();
   }
);​
  • 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-01T02:47:21+00:00Added an answer on June 1, 2026 at 2:47 am

    Disabled input elements don’t register click events. You can place another element on top of it and grab the click on that however (see the div in the third list item). See this jsFiddle example.

    jQuery:

    $('li').on('click', 'div', function(event){ 
        alert('clicked');
    );​
    

    HTML:

    <ul class="field">
        <li><span>Test A <label for="id_check1">Check 1</label>:
        <input checked="checked" type="checkbox" value="1" id="id_check1" /></span>
        </li>
        <li><span>Test B <label for="id_check2">Check 2</label>:
        <input checked="checked" type="checkbox" value="2" id="id_check2" /></span>
        </li>
        <li style='position: relative'>
        <div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;">
        </div>
        <span>Test D <label for="id_check3">Check 3</label>:
        <input checked="checked" type="checkbox" value="3" id="id_check3" disabled="disabled" /></span>
        </li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having issues getting this to work, maybe its not even possible? I have
I'm having issues with a bit of code that I am writing in C#.
Having issues referencing $(this) from within a the nested ajax 'success' function... I know
Still having issues with this problem. Please help if you can. So I am
Im having issues vertically positioning text inside of a text input field in Firefox.
I am having issues with trying to convert an UTF-8 string to unicode. I
I am having issues getting the -e and -d file test operators to work
I am having issues with loading external javascript using JQuery. Every time when I
I am having issues testing out the Scala Parser Combinator functionality for a simple
I'm having issues with the Facebook like button on my pages. On some pages

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.