I have created a bit of code to hide my menu, the menu is not complete but I am trying to use jQuery.slideUp()
function but it adds style="overflow: hidden;"
to the code so when I use .show one of my elements is hidden which is #nav:after
and #nav:before
which adds a small arrow to the bottom of the menu
here is the js code
$("span#start_button").click(function () {
if ($("#nav").is(":hidden")) {
$("#nav").show("fast");
} else {
$("#nav").slideUp();
}
});
and here is the result on this site
How can I stop .slideUp()
from creating style="overflow: hidden;"
?
hidden. The opposite of the default visible is hidden. This literally hides any content that extends beyond the box. This is particularly useful in use with dynamic content and the possibility of an overflow causing serious layout problems.
hidden - The overflow is clipped, and the rest of the content will be invisible. scroll - The overflow is clipped, and a scrollbar is added to see the rest of the content. auto - Similar to scroll , but it adds scrollbars only when necessary.
You must remove the overflow:hidden
on the callback of the slideUp()
function
so you can try
$("#nav").slideUp('fast', function(){ $('#nav').css('overflow','visible') });
Or you can force it by css
#nav{overflow:visible!important}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With