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

  • Home
  • SEARCH
  • 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 8505107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:13:32+00:00 2026-06-11T02:13:32+00:00

I’m working on trying to wire up a click event (to slideToggle) to a

  • 0

I’m working on trying to wire up a click event (to slideToggle) to a dropdown title that is drawn by Raphael. What I need is when the user clicks on the gray box, content drops down vai a jQuery slideToggle.

Here is an example Rendered Drop Down.Rendered Drop Down

I grab by class

var title = $('.title'); //title div
var title_content = $('.title_content'); //title content div
var holder = $('.holder'); //holder div
var content = $('.content'); //content div

draw and text wrap (works perfectly), but when I get to the part of wiring the click events, I can’t get them to wire correctly. If I’m thinking correctly this would for each holding div create a click event on the title to slide the content out from underneath, or atleast that is what I’m going for.

$(holder).each(function() {
                    $(this).closest('.title').click(function() {
                        $(this).closest('.content').slideToggle('fast');
                    });

                });

Here is the structure of the HTML

<div class="holder">
        <div class="title">
            <div class="title_content" style="display: none;">
                Email Questions:
            </div>
        </div>
        <div class="content" style="display: none;">
            <p class="faqtitle">
                What type of email?</p>
            <div class="faqanswer">
                <p>
                    access the site.</p>
            </div>
            <p class="faqtitle">
                receive the email?</p>
            <div class="faqanswer">
                <p>
                    1 business day.</p>
            </div>
            <p class="faqtitle">
                email?</p>
            <div class="faqanswer">
                <p>
                    one-time email.</p>
            </div>
        </div>
    </div>

also as a side note I get get one click on the titles to open all toggles by using

            title.click(function() {
                content.slideToggle('fast');
            });

——————————————————-

AND THE ANSWER IS

$(title).each(function() {
      $(this).click(function() {
             $(this).next().slideToggle('fast'); 
      });

});
  • 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-06-11T02:13:33+00:00Added an answer on June 11, 2026 at 2:13 am

    You could Achieve this way

    $('.title').click(function(){function(){
       $(this).next().slideToggle('fast');
    }});
    

    And Expanding each

    $('.title').each(function(){
       $(this).next().slideToggle('fast');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I need to clean up various Word 'smart' characters in user input, including but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.