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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:49:42+00:00 2026-06-10T10:49:42+00:00

I have some divs that I am using the JQuery .show() and .hide() functions

  • 0

I have some divs that I am using the JQuery .show() and .hide() functions on, however I can not get the effects/directions to change.

HTML

<li><a class="link" name="box1">HOME</a></li>
<li><a class="link" name="box2">ABOUT ME</a></li>

<div id="box1">
  SOME CONTENT
</div>

<div id="box1">
  SOME CONTENT
</div>

JavaScript

$(".link").click(function(){
    $('.container').hide();
    $('#'+$(this).attr('name')).show();   
});

Simply using .show() and .hide() appear to work. .show('slide') also works. However .show('fold') or .show('blind') does not. Nor does trying to change the direction/speed of the animation. For example:

$(".link").click(function(){
    $('.container').hide('slide', {direction:'up'}, 1000);
    $('#'+$(this).attr('name')).show('slide', {direction: 'up'}, 1000);   
});

It is important that it shows the bottom of the div first which is why im not using the .slideDown function.

Tried looking at the documentation and online tutorials but cant find out why it wont work.

  • 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-10T10:49:43+00:00Added an answer on June 10, 2026 at 10:49 am

    For the ‘enhanced’ animation effects, you’ll have to include the jQuery UI library (or a specific implementation of perhaps just the animation core).

    From the API page for show():

    As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing, and one that progresses at a constant pace, called linear. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.

    So the named animations available with ‘just’ jQuery are ‘linear’ and ‘swing.’ Including jQuery UI opens up several others (linking because it seemed pointless transcribing them).

    To link to the Google-hosted jQuery UI from their CDN:

    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
    

    References:

    • Google’s CDN code library.
    • show().
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some DIVs that I am using JQuery to hide and show using
I am using jQuery 1.4.3. I have some divs that have microdata in them
I have a form and some divs that I modify using jquery. On form
I have some jQuery code, which attempts to show the first 6 divs on
I'm using a bit of jQuery to expand/hide some divs. I need to add
I used this example to hide and show some divs on my site: http://papermashup.com/simple-jquery-showhide-div/
I'm trying to create two buttons that using the hover event, hide some divs
I have some dropdown menus that are display:none and only show upon click (using
So here is the issue, I have 6 divs that are using jQuery UI
I have some divs that have dynamic heights controlled by a 'click' function as

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.