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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:22:17+00:00 2026-05-27T21:22:17+00:00

Ideally I would like to be able to make the event target all p.hiddeninput,

  • 0

Ideally I would like to be able to make the event target all p.hiddeninput, which do not also have the specific (“.” + this.id + “Y”) class, within the parent div of the radio buttons. I have tried using the .parent() selector without any success.

I have a situation where I need to set up 5 radio buttons, 4 of which need to display a specific hidden input when they are clicked. Both the price table and supplement radio buttons need to open the same input. Any previously open inputs need to also hide when this occurs. Currently I have html that looks like this,

<input value="auto" type="radio" class="oneofmany" name="buypricebyradio" id="buypricebyradiomarkdown">Markdown</input>
<input value="pricetable" type="radio" class="oneofmany" name="buypricebyradio" id="buypricebyradiopricetable">Price table</input>
<input value="fromsupplement" type="radio" class="oneofmany" name="buypricebyradio" id="buypricebyradiofromsupplement">From supplement</input>
<input value="discount" type="radio" class="oneofmany" name="buypricebyradio" id="buypricebyradiodiscount">Discount</input>
<input value="noprice" type="radio" class="oneofmany" name="buypricebyradio" id="buypricebyradionoprice">No price</input>


<p style="display:none" class="buypricebyradiopricetableY buypricebyradiofromsupplementY hiddeninput"><label for="buyingpricetable">Buying price table:</label><input class="medium include search" id="buyingpricetablesearch"></input></p>
<p style="display:none" class="buypricebyradiomarkdownY hiddeninput"><label for="markdownstyle">Mark down style:</label><input class="medium include search" id="markdownstylesearch"></input></p>
<p style="display:none" class="buypricebyradiodiscountY hiddeninput"><label for="buydiscountstyle">Discount style:</label><input class="medium include search" id="buydiscountstylesearch"></input></p>

With a jscript command of

$('.oneofmany').click(function(){     
      $("p.hiddeninput").not("." + this.id + "Y").hide();   
      $('.' + this.id + "Y").show();
}); 

This works just fine for one set of radio buttons and inputs. However I need to have multiple sets, and in this situation, when a radio button is clicked in one set of inputs, it closes all the inputs in the other sections as well.

Is it possible to target an event like this, and if not can anyone suggest a solution to this problem? Thank you for your time.

  • 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-27T21:22:18+00:00Added an answer on May 27, 2026 at 9:22 pm

    target all elements of a specific class within the parent div of the button that calls the event?

    $(this).parent('div').find('.specific-class')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to make a custom window which would look something like this
I'd like to be able to unit test my Arduino code. Ideally, I would
I have a route like following, ideally I would like it to match: domain.com/layout/1-slug-is-the-name-of-the-page
I would like to get a list of the wireless networks available. Ideally this
I would like to setup a multi-tenant ASP.NET MVC app. Ideally, this app would
I have two HTML tables which would ideally be placed side by side on
I'd like to make a new event type in JavaScript. Say I have some
I would like to animate movement on a SurfaceView . Ideally I would like
and it's linked to a 'confirm comment deleted page. Ideally I would like it
I am developing a firefox extension and ideally would be able to get the

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.