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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:16:12+00:00 2026-06-16T03:16:12+00:00

I have group of radio buttons like this: <form> <input class=answer name=answer value=10 type=radio>ans0<br>

  • 0

I have group of radio buttons like this:
<form>
<input class="answer" name="answer" value="10" type="radio">ans0<br>
<input class="answer" name="answer" value="11" type="radio">ans1<br>
</form>

And I have place on page where I write how many times did you click on any radio button.

<p>Clicked:</p>
<p id="clicked">0</p>

I need jquery to count all those clicks. Can you help me?

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

    Attach a click-event listener to your radio buttons. Then in the callback you read the current number in the element with id clicked, you parse it into a number, add 1, and write the new value to the element.

    Something like this:

    // Attach a click-event listener to your radio-buttons​
    $("input[type='radio']")​.on("click", function () {
        // Cache the element
        var elm = $("#clicked");
        // Read the current value
        var count = parseInt(elm.text(), 10);
        // Update the element with the new value
        elm.text(count + 1);    
    });​​​​​​​​
    

    DEMO

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

Sidebar

Related Questions

i have one group of radiobutton: <div id=id1> <input id=pack1 type=radio class=pack name=pack value=OK
I have a group of radio buttons on my page like this: ALL (x)
I have a radio button within my form as follows <div class=btn-group data-toggle=buttons-radio> <%=
I have 2 radio button with 2 group. The structure is like this Main
I have a form with a series of questions, radio buttons. Each group is
I have this group of radio buttons in which each of individual button has
I've got this HTML form where I have multiple input elements: text, radio, and
I have a few radio buttons in a group, one of them being: <input
I have a radio button group on a survey form whose html looks like:
I have a form with several radio buttons grouped by the same name, and

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.