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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:04:33+00:00 2026-05-25T15:04:33+00:00

I have a JavaScript slide-out menu on my page. As the page is loading

  • 0

I have a JavaScript slide-out menu on my page. As the page is loading the menu shows in the wrong place and as opened (it should be closed by default). It then jumps into the correct position and state once the page has loaded.

I would like the menu to either load last or be in the correct position to start with. I have tried making the style for the menu hidden and the display it as a block on page load with JavaScript but the menu just stays hidden.

<link rel="stylesheet" type="text/css" media="all" href="<css/style.css" />
<link rel="stylesheet" type="text/css" media="all" href="</css/reset.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.tabSlideOut.v1.3.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('.slide-out-div').tabSlideOut({
        tabHandle: '.handle',  
        pathToTabImage: 'images/closed_menu.png', //class of the element that will become your tab
        imageHeight: '230px',                     //height of tab image           //Optionally can be set using css
        imageWidth: '62px',                       //width of tab image            //Optionally can be set using css
        tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
        speed: 600,                               //speed of animation
        action: 'hover',                          //options: 'click' or 'hover', action to trigger animation
        topPos: '270px',                          //position from the top/ use if tabLocation is left or right
        leftPos: '30px',                          //position from left/ use if tabLocation is bottom or top
        fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
    });

$("div.slide-out-div").mouseover(function(){
$('.handle').css("background-image", "url(images/open_menu.png)"); 
  }).mouseout(function(){
      $('.handle').css("background-image", "url(images/closed_menu.png)"); 
  });

$('#sliderimages').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    next:   '#next', 
    prev:   '#prev' 
});

 });
</script>

<body onload="javascript:document.getElementByClass('slide-out-div').style.display = 'block';">

and then the CSS

.slide-out-div {
display: none;
padding-left: 0px;
width: 200px;
z-index: 3;
position: relative;
}
  • 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-25T15:04:33+00:00Added an answer on May 25, 2026 at 3:04 pm

    A possible solution might be this. In the <head> of your html add:

    <script>document.documentElement.className += ' js'</script>

    This will add a “js” class onto the <html> element.

    Next, in your css file style your menu as you would normally, but immediately after, hide it by adding the .js class. For example:

    .menu { /* your normal styling goes here */ }
    .js .menu { display: none; }
    

    This makes sure that your menu is shown in clients that do, for whatever reason, not support JavaScript but hidden in clients that do support JavaScript.

    Next up, adapt your JavaScript file to show the slide-out menu when needed.

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

Sidebar

Related Questions

Right now on my website I have the following JavaScript that shows and hides
I have a JQuery slideshow where some text/slide fades in and out. At the
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
You may have seen JavaScript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular
I'm aware of server-side javascript for a long time now, but I don't have
I am working with ASP.NET doing some client side javascript. I have the following
I have a problem with a javascript error: $(#slider) is undefined How can i
Is it possible to have XML-embedded JavaScript executed to assist in client-side (browser-based) XSL
I am currently developing a site and have a need for a javascript-based carousel/slider
I have to maintain a server-side script written in JScript (NOT Javascript) that needs

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.