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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:09:30+00:00 2026-05-16T15:09:30+00:00

jQuery UI seems to be sensitive to the attributes of the elements that compose

  • 0

jQuery UI seems to be sensitive to the attributes of the elements that compose a widget. How then can I use the same widget mutiple times in a single page\form?

Example – the radio select widget, which comes in the demo index.html file that downloads with jQuery-ui:

<!DOCTYPE html> 
<html>
    <head> 
        ...
        $(function(){
            $("#radioset").buttonset();
        }
        ...
    </head>
    <body>
        ...
        <form style="margin-top: 1em;"> 
            <div id="radioset"> 
                <input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
                <input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label> 
                <input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
            </div> 
        </form> 
        ...
    </body>
</html>

What code then should I add to have a second div with a different set of radio buttons?

  • 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-16T15:09:31+00:00Added an answer on May 16, 2026 at 3:09 pm
       $(function(){
                $("#radioset2").buttonset();
            }
    <div id="radioset2">
    

    Or you could use

    $(".radioset").buttonset();
    

    Wich would select the radioset class not the id so you could have many.

    To address your comment:

    $(function(){
                    $("#radioset1").buttonset();
                    $("#radioset2").buttonset();
                }
    
    <form name="form1" style="margin-top: 1em;"> 
                <div id="radioset1"> 
                    <input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
                    <input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label> 
                    <input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
                </div> 
    </form>
    <form name="form2" style="margin-top: 1em;"> 
                <div id="radioset2"> 
                        <input type="radio" id="radioAgain1" name="radio" /><label for="radio1">Choice 1</label>
                        <input type="radio" id="radioAgain2" name="radio" checked="checked" /><label for="radio2">Choice 2</label> 
                        <input type="radio" id="radioAgain3" name="radio" /><label for="radio3">Choice 3</label>
                    </div> 
            </form> 
    

    I see no reason for the above not to work.

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

Sidebar

Related Questions

I'm trying to filter a list of elements via ':not()', and jQuery seems to
It seems that jQuery.browser is deprecated in the latest jQuery. The doc recommends that
It seems that i cannot access $(this) inside jquery ajax success function. please see
I have this jquery issue that seems to only break when using background image
I'm developing a javascript widget that depends on jQuery. The widget may or may
I have a table column I’m trying to expand and hide. jQuery seems to
Hey guys, the following snippet of jQuery code seems to work fine in Google
It seems like this should be something built into jQuery without the need for
seems like I'm stuck with jQuery tabs. I'm trying to pass selected tab name
I am trying to test the jQuery Address Plugin and it seems to not

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.