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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:53:34+00:00 2026-05-22T22:53:34+00:00

I am currently putting together some jQuery that will activate slideDown() when an element

  • 0

I am currently putting together some jQuery that will activate slideDown() when an element is clicked that is generated by js.

Here is my function:

$('.radiowrap').delegate("span[title='yes']", "click", function() { 
    $('.radiowrap').next('.secondq:first').slideDown('medium'); 
}); 

This works fine but only if I specify the element (as shown above) therefore activating every matching element. If I use $(this) like so:

$('.radiowrap').delegate("span[title='yes']", "click", function() { 
    $(this).next('.secondq:first').slideDown('medium'); 
}); 

The code doesn’t work… does anyone have a solution to this? Here is a snippet of my HTML:

<div class="option radio">
    <h2 class="block">Do you have a hot water tank?</h2>
    <div class="radiowrap">
        <div class="radiocont">
            <label>Yes</label>
            <input type="radio" class="styled" value="yes" name="watertank" />
        </div>
        <div class="radiocont">
            <label>No</label>
            <input type="radio" class="styled" value="no" name="watertank" />
        </div>
    </div>
    <div class="secondq" style="display:none;">
        <h2>What type of water tank is it?</h2>
        <div class="radiowrap">
            <div class="radiocont">
                <label>Steel</label>
                <input type="radio" class="styled" value="steel" name="watertanktype" />
            </div>
            <div class="radiocont">
                <label>Fibreglass</label>
                <input type="radio" class="styled" value="Fibreglass" name="watertanktype" />
            </div>
        </div>
        <h2 align="left">How much insulation does it have?</h2>
        <input type="text" align="right" name="bonus" class="value" disabled="disabled"  />
        <div class="slidewrap">
            <div class="sliderMm slider"></div>
        </div>
    </div>
</div>
  • 1 1 Answer
  • 3 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-22T22:53:35+00:00Added an answer on May 22, 2026 at 10:53 pm

    Use $(this).closest(".radiowrap") instead.

    .delegate() and .live() try to emulate .bind() as close as possible; thus, inside the event handler, this points to the .radiowrap span[title='yes'] that was clicked, just as if you had bound to that <span /> directly.

    Using .closest(".radiowrap") will find the ancestor .radiowrap of the clicked <span />, from whence you can proceed as before.

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

Sidebar

Related Questions

I am currently putting together a rails-based web application which will only serve and
I am currently putting together a demo application that needs to show 28,000 markers
I'm putting together a simple web page that presents the user with a jQuery
little background: currently putting together a website that is selling products, many of which
I'm putting together a WCF service that handles a large search (currently 50-60 parameters,
I'm putting together a fixed, one-page site that deploys an overlay using jQuery. There
I'm currently putting together some changes in our data model which include changing a
I'm interested in putting together some manual test cases in order to verify that
I'm putting together a new app and, while I normally use JQuery for things
I'm putting together a portfolio website which includes a number of images, some of

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.