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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:29:38+00:00 2026-06-15T08:29:38+00:00

If i comment out the jquery.mobile…js file, this works fine, with it included, everytime

  • 0

If i comment out the jquery.mobile…js file, this works fine, with it included, everytime i click the checkbox, the onclick event fires twice. Same is true for onchange event. Any ideas?

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
    <script>
        function tester() { alert("I get called twice on click"); }
    </script>
    <input id="abc" name="myCheckbox" onchange="tester()" type="checkbox" value="true" />

    <label for="myCheckbox">Click me</label>
</body>
</html>
  • 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-15T08:29:40+00:00Added an answer on June 15, 2026 at 8:29 am

    Your markup is malformed. The <label> tag points to a non-existent id. It points to “myCheckbox” but the id of your input tag is “abc”. This change fixes your issue and the markup is correctly enhanced.

    <input id="abc" name="myCheckbox" onchange="tester()"
        type="checkbox" value="true" />
    <label for="abc">Click me</label>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i'm using this plugin https://github.com/podio/jquery-mentions-input for my comment system, everything works fine but
Each of the rules in the file works well if I comment out the
It's not working, but if I comment out uncheck.removeAttr('checked') , it works! Where am
I started out with this code for submitting a form using the jQuery ajax
My select event doesn't work if I use _renderItem. If I comment out the
## COMMENT OUT below just for reference cursor.execute ( CREATE TABLE yellowpages ( business_id
Can I comment out lines which have other comments? /* * comment 1 */
Is there a way to comment out a single line in HTML using just
The following view crashes the iPhone If I comment out the using (webView =
I'm just wondering if it's possible to comment out IE conditional comments themselves (for

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.