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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:59:37+00:00 2026-05-21T03:59:37+00:00

I’m trying to create a sliding FAQ menu using jQuery, but I’m getting an

  • 0

I’m trying to create a sliding FAQ menu using jQuery, but I’m getting an error that states the the hide() is null. I’ve tried it in Chrome and Firefox on Mac and Firefox on Win. Here’s the code:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){

    $('.hide').hide();

    $('h5').click(function(){
    $(this).next().slideToggle("slow");
    return false;
});


});

And here is the HTML:

<a href="#" ><h5 >The Heading </h5></a><br />

<div class="hide">
The content.
</div>

I’ve spent the last three hours pouring over books and tutorials online and everything looks right, but apparently not. 😛

Any help is much appreciated.

  • 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-21T03:59:38+00:00Added an answer on May 21, 2026 at 3:59 am

    Update: After Ant published the public URL of the page I can confidently reiterate my claim that there is no problem in the sample code posted by Ant in his original question so thank you whoever down voted me. The problem is that Ant’s page is using both prototype and jQuery libraries together. This fact is omitted from the original question. These two libraries are conflicting over $ variable. If you change your code Ant to use the keyword jQuery instead of $ everywhere as

     jQuery(document).ready(function() {
         jQuery('.hide').hide();
    
         jQuery('.toggler').click(function() {
             jQuery(this).nextAll('.hide:first').slideToggle("slow");
             return false;
         }); });
    

    I am confident your code will work. Alternatively you can use the no conflict technique as described on jQuery pages here

    http://api.jquery.com/jQuery.noConflict/

    There is nothing wrong with your code. Can you put this on a public site and share the URL? The only thing I can think of is that jQuery is not being pulled in.

    Try moving the

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    

    in the HEAD tag

    and the rest of the javascript code after the closing

     </HTML>
    

    tag

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

Sidebar

Related Questions

No related questions found

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.