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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:16:39+00:00 2026-05-23T07:16:39+00:00

I am using this function to show/hide a div. But this is not working.

  • 0

I am using this function to show/hide a div.

But this is not working.

It’s working only for hide and not working for show. And i need to show and hide the fields in slow style.

How can this be done?

what was my mistake here…

$(document).ready(function(){
    $("#field-reviewers-items").hide();
    $('#edit-field-openforreview-value-1').click(function(){
        $("#field-reviewers-items").show();
    });
    $('#edit-field-openforreview-value-1').click(function(){
        $("#field-reviewers-items").hide();
    });
});
  • 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-23T07:16:40+00:00Added an answer on May 23, 2026 at 7:16 am

    You are setting the click method twice, meaning $.hide() will run immediately after $.show(). This takes place so quickly that it seems as though $.show() isn’t even working. Instead, set the click once and instruct it to toggle the visibility:

    $("#edit-field-openforreview-value-1").click(function(){
      $("#field-reviewers-items").fadeToggle('slow');
    });
    

    This code assumes you wanted the same element to toggle the visibility of the #field-reviewers-items element; I felt this was a safe assumption since your selector was the same for both click events. It’s possible that you had a typo though, and the second selector was supposed to be value-2 instead:

    var $fieldRevItems = $("#field-reviewers-items");
    
    $("#edit-field-openforreview-value-1").click(function(){
      $fieldRevItems.show('slow');
    });
    
    $("#edit-field-openforreview-value-2").click(function(){
      $fieldRevItems.hide('slow');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

CODE: $(document).ready(function() { $('.toggle').hide(); $('.show').click(function(){ $('.toggle').toggle('slow'); $(this).attr('src','images/checkmark2.jpg'); },function(){ $('.toggle').toggle('slow'); $(this).attr('src', 'images/checkmark1.jpg'); return false; });
I've been using this function but I'd like to know what's the most efficient
I'm using this Jquery function for available username check. How can I fire this
I am loading images externally using jQuery load function.. but not able add light
Using jQuery I am trying to create a function to show and hide the
I'm using .NET 4 and JQuery to show/hide Div's depending on what's selected from
I am using Jquery to hide show a div. I want to show the
I am using this function to close existing form and open a new form.
I'm using this function to extract files from .zip archive and store it on
so I'm deploying a shipping calculator using this function , and I'm getting this

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.