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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:50:48+00:00 2026-06-14T21:50:48+00:00

How could i keep a div hidden after the user goes to another page

  • 0

How could i keep a div hidden after the user goes to another page or refreshes the page? I have the following code in the footer so it loads on every page:

$(document).ready(function() {
 $('#clickmebottom').click(function() {
      $('#bottomfixtab').animate({
           height: 'toggle'
           }, 350
      );
 });
});

#clickmebottom is an X button that – on click – hides the #bottomfixtab div (small fixed banner at bottom of screen)

Thanks for the help

  • 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-14T21:50:49+00:00Added an answer on June 14, 2026 at 9:50 pm

    You can use a jQuery plugin such as jquery-cookie to simplify cookie access. So your code would become something like this to save the div’s toggle setting:

    // pseudo-code, you'll want to check the actual syntax
    $(document).ready(function() {
    
      // see if the cookie is set, if it is, hide the div
      if ( $.cookie('toggledDiv' ) {
        $('#bottomfixtab').hide();
      }
      $('#clickmebottom').click(function() {
        $.cookie('toggledDiv');
        $('#bottomfixtab').animate({
          height: 'toggle'
        }, 350 );
      });
    });
    

    this will probably make the div flash then hide so if you want to avoid that flash, set the default to display: none, then if the cookie is not set, show the div:

    // again, pseduo-code
    if ( !$.cookie('toggledDiv') ) {
      $('#bottomfixtab').show()
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following HTML, which I could change, but would prefer to keep
I have install the latest Xcode but this keep occurring. How could I solve
I have three div layers inside of another larger one. Something like this: Image
could you please clarify my issue? I have a starting page ListBox1.aspx that calls
I have the following layout: <div id=content> <div id=img><img src=></div> <div id=main>Some content</div> <div
I have a div which could be dragged around and scaled. It may or
I have a footer, and want to do the good old fashioned Keep the
I have a div or any other element. I need to keep some parameter
How could I resize an image and still keep it's aspect ratio? This is
Could someone please tell me why this <%= destroy_password_url @user.password_reset_token %> generates http://localhost:3000/api/destroy_password.4G5EoRVYMUAtiIKqOerKsw routes.rb

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.