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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:25:06+00:00 2026-05-13T20:25:06+00:00

I have an area where a chunk of HTML (shown below) is added dynamically

  • 0

I have an area where a chunk of HTML (shown below) is added dynamically as many times as the user would like. No worries there. The problem is, within that HTML block is a select box and then a div that is hidden by default but should be shown if the “dropdown” option is selected from the select menu.

<div>
    <select name="" class="select_change">
      <option value="">--Select One--</option>
      <option value="textarea">Text Area</option>
      <option value="textbox">Text Box</option>
      <option value="checkbox">Check Box</option>
      <option value="dropdown">Drop Down</option>
    </select>
</div>
<div class="dropdown_fields hidden">
  <label>Options</label>
  <p><textarea name="" rows="8" cols="40"></textarea></p>
  <p class="field_desc">Please enter the values that should display in the Drop Down, one per line.</p>
</div>

So, the problem I’m having is showing/hiding that div when there are multiple identical blocks of HTML.

What I’m assuming is I need to say that the div right after the select menu that was invoked is the only one that needs to have action applied to it…but I’m not sure how to do that.

  • 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-13T20:25:07+00:00Added an answer on May 13, 2026 at 8:25 pm

    Assuming the toggle-able div follows the selects parent (as indicated by your example):

    $(".select_change").live("change", function(){
      $(this).val() === "dropdown" 
        ? $(this).parent().next().show() 
        : $(this).parent().next().hide();
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an area on my page that I would like to update
I have a multi-user eclipse (3.4) installation with a shared master configuration area. Users
I'd like to have a group of HTML text <input> 's that can be
Can user have private area on Perforce server ? This area will be used
I have form area in my view. If I click button A , I
I have a text area and a function to do syntax highlighting on it.
I have a 2D area with dots distributed on this area. I now am
I have a page which has a rectangular area with text and icons in
I have a web page x.php (in a password protected area of my web
I have a program that will calculate the minimal area taken by fitting rectangles

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.