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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:16:59+00:00 2026-05-25T16:16:59+00:00

I have been stuck with a code for a few days, and what I’m

  • 0

I have been stuck with a code for a few days, and what I’m really trying to do is to append NEXT and PREVIOUS (link/button) on a radio button.

    <div id="slides">
        <ul class="options-list">
            <li>
            <input type="radio" class="getradiotomove" id="bundle-73" name="bundle_option" value="73">
            <input type="radio" class="getradiotomove" id="bundle-72" name="bundle_option" value="72">
            <input type="radio" class="getradiotomove" id="bundle-74" name="bundle_option" value="74">
        </ul>
    </div>

    <div id="buttons">
        <a href="#" id="prev">prev</a>
        <a href="#" id="next">next</a>
        <div class="clear"></div>
    </div>  

what I am trying to do here is that, when i click on next, it will select the radio button below it, so the code above has bundle-73, bundle-72 and bundle-74, says if the default selected is bundle-73, when i click next, it should select bundle-72.

  • 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-25T16:17:00+00:00Added an answer on May 25, 2026 at 4:17 pm

    Your HTML looks broken so I’m going to assume you really mean this:

    <div id="slides">
        <ul class="options-list">
            <li><input type="radio" class="getradiotomove" id="bundle-73" name="bundle_option" value="73"></li>
            <li><input type="radio" class="getradiotomove" id="bundle-72" name="bundle_option" value="72"></li>
            <li><input type="radio" class="getradiotomove" id="bundle-74" name="bundle_option" value="74"></li>
        </ul>
    </div>
    

    Then your next action would look like this:

    $('#next').click(function() {
        var $all     = $('.getradiotomove');          // Get them all
        var $current = $('.getradiotomove:checked');  // Get the current one
    
        var index = $all.index($current) + 1;         // Find the index of the next one
        if(index >= $all.length)                      // Wrap around at the end
            index = 0;
        $($all[index]).attr('checked', 'checked');    // Check it.
    });
    

    Demo: http://jsfiddle.net/ambiguous/hTgv3/1/

    This assumes that you only have the one group of radio buttons.

    You should be able to sort out the previous action yourself.

    References:

    • :checked selector
    • index function
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have been stuck with this issue for a few days now, and really need,
I have been stuck on this for days, and was wondering if anyone had
I have been trying to make an init script using start-stop-daemon. I am stuck
For the past few days I have been attempting to write my own shell
So, for the past few days I have been struggling to understand how to
I've been stuck on this for a few days now and can't seem to
Morning, I have been working on this problem for a few days and cannot
So I have been stuck for a couple of hours trying to get this
I have been stuck on a particular part of my website-to-be for a few
Hope to get solution to this problem. I have been stuck on it since

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.