anadamastor
anadamastor

Reputation: 1

Menu opens (drops down) when page opens

I am currently working on wordpress with a theme called WallBase, which you can preview here http://demo.fabthemes.com/Wallbase/.

When the page fillany loads, the menu drops down.

I want it to stay closed, and I tried several options but I don't understand JS so, I couldn't fiz my problem, and I assume it should be pretty straightforward.

Here is the JS code I found:

jQuery(document).ready(function() {

/* Navigation */
jQuery('#submenu ul.sf-menu').superfish({ 
        delay:       500,                               // 0.1 second delay on mouseout 
        animation:   {opacity:'show',height:'show'},    // fade-in and slide-down animation 
        dropShadows: true       // disable drop shadows 

    }); 

/* Menu Show/Hide */

jQuery("#botmenu").hide();
jQuery(window).load(function()  {
jQuery('#botmenu').slideDown(1000, function() {
    jQuery('.trig').addClass("trigu");
    });
});

jQuery('.strigger').toggle(function(){

    jQuery('#botmenu').slideUp(500, function() {
    jQuery('.trig').removeClass("trigu");
    });
    }, function(){
    jQuery('#botmenu').slideDown(1000, function() {
    jQuery('.trig').addClass("trigu");
    });
    });

I'ver tried editing the js and also adding a display:none in css for .load and .slideDown but it doesn't work.

Please help me!!

Upvotes: 0

Views: 93

Answers (1)

docodemore
docodemore

Reputation: 1074

The code that seems like the culprit is here:

jQuery(window).load(function()  {
jQuery('#botmenu').slideDown(1000, function() {
    jQuery('.trig').addClass("trigu");
    });
});

try commenting that out, because it seems to activate right when window is loaded. The tall-tale sign to me is at least: jQuery(window).load(function() which in plain english means "When the window has loaded, do this"

/*
jQuery(window).load(function()  {
jQuery('#botmenu').slideDown(1000, function() {
    jQuery('.trig').addClass("trigu");
    });
});
*/

This may not completly solve the issue and the wallbase javascript might be dependent on it. meaning, you're changing the behavior and the theme might be engineered to expect the behavior you remove.

Upvotes: 1

Related Questions