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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:36:01+00:00 2026-06-11T06:36:01+00:00

I am setting my jquery mobile checkboxes like so.. $(#checkbox-2a).attr(checked, settings.DEnabled).checkboxradio(refresh); Here is the

  • 0

I am setting my jquery mobile checkboxes like so..

 $("#checkbox-2a").attr("checked", settings.DEnabled).checkboxradio("refresh");

Here is the markup

 <fieldset data-role="controlgroup" data-mini="true" style="text-align:center;">
            <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" />
            <label for="checkbox-2a">
                Enable D</label>
..

The checkboxes get checked correctly. But now when I want to retrieve a value with this code..

  settings.DEnabled = $("#checkbox-2a").attr("checked");

When I debug it returns ‘checked’, when I look at the markup eventhough the checkboxes are getting updated when the correct check bool in the ui. I dont see a ‘checked’ attribute in the markup.

How do I get/find the value of the checkbox?

  • 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-11T06:36:02+00:00Added an answer on June 11, 2026 at 6:36 am

    attr doesn’t return a boolean value, you can use prop method: http://api.jquery.com/prop/#entry-examples

    settings.DEnabled = $("#checkbox-2a").prop("checked");
    

    Or is method:

    settings.DEnabled = $("#checkbox-2a").is(":checked");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jquery mobile datebox from here: http://dev.jtsage.com/jQM-DateBox/ and I am setting the
I'm using jquery mobile link and i'm setting it like below: <a data-theme=a data-iconpos=notext
I m setting up 5 sliders using jQuery UI in a form like this:
I'm setting up a JQuery mobile site with ASP.NET MVC 3 and the Razor
I'm setting up a mobile app with jQuery Mobile and PhoneGap. What I want
I am using jquery-mobile and it seems it doesn't detect the landscape setting. What
I have an image container based on Jquery Mobile listview element structure. Looks like
I'm using jquery mobile, and I have a image that I would like to
Is it possible to overwrite the jquery mobile form button settings? I want to
I'm setting up jQuery UI autocomplete on a CakePHP site, and feel like I'm

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.