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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:08:58+00:00 2026-06-12T06:08:58+00:00

I am new to jquery and javascript but am practising by doing. I would

  • 0

I am new to jquery and javascript but am practising by doing. I would like to create a simple click function where content below is revealed. Simple stuff you say. For some reason it is not in my case. I have an example at http://jsfiddle.net/richlewis14/FRP3R/1/.

What I want to do is click on the h3 element and then it will reveal all the content underneath. What I would also like to do is not use the slideUp function to hide the content first as when loading the page you can see the content disappear, which looks a little tacky to me. Do I need to hide the div rather than slideUp on load?

HTML:

<div class="container">
      <div class="row">
      <div class="span4">
      <div class="widget">
        <div class="widget-header">
          <i class="icon-info-sign icon-large"></i>
           <h3 class="clickme">Core</h3>
        </div><!--/widgetheader-->
         <div class="widget-content-box">
          <p>Hello</p>


         </div><!--/widget content-->
        </div><!--widget-->
      </div><!--span4--><div class="container">

JavaScript:

$(".widget-content-box > p").slideUp();
$("h3.clickme").click(function(){
    $(this).next.slideToggle("slow");
});

Any help appreciated, thanks

  • 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-12T06:08:59+00:00Added an answer on June 12, 2026 at 6:08 am

    There is a typo in your code next should be next(). also note that you should first use parent() and then next() method(‘.widget-content-box’ is not the next sibling of your h3 element) and when you hide the p element .widget-content-box has nothing visible to show, you should hide the .widget-content-box instead.

    $(document).ready(function(){
        $(".widget-content-box").slideUp(); // $(".widget-content-box").hide()
        $("h3.clickme").click(function(){
            $(this).parent().next().slideToggle("slow");
        });
    })
    

    http://jsfiddle.net/qxnjj/

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

Sidebar

Related Questions

I'm somewhat new to jQuery/javascript, and would like to compare the contents of row[i]
I would like to create element in Jquery/Javascript by using div.someelement like this var
I'm new to javascript/jquery and I've done some poking around the web, but I
I can bind a jquery event to this element like: <script type=text/javascript> $('#new_key').ready(function() {
I'm relatively new to JQuery and would like to try something. I just followed
I am very new to jQuery and javascript programming. I have a program below
I'm somewhat new to JavaScript/jQuery, but when I saw examples of method chaining it
New to jquery. I already got this running in javascript but am switching to
I'm new to jquery and javascript, but I am looking to do what I
This seems pretty simple, but I can't figure it out. I'm new to javascript/

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.