[SOLVED] slideUp/Down working but not sliding
I'm trying to use slideUp and slideDown, they seem to be working in terms of being Up and Down but there is no sliding between these states, any ideas?
My CSS:
- #sub-nav{
- width:240px;
- min-height:240px;
- padding:0;
- background:url(../images/80-opacity-bg-fill-purple.png) repeat;
- overflow:hidden;
- position:relative;
- z-index:4;
- display:none;}
.sub-nav{margin:0; padding:20px 0;}
.sub-nav > li{
- border-bottom:1px dotted #fff;
- width:200px;
- margin:0 0 0 20px;
- list-style:none;
- font-family:Tahoma, Geneva, sans-serif;
- font-size:13px;}
.sub-nav > li > a{
- display:block;
- padding:4px 10px;
- text-decoration:none;
- color:#fff;}
.sub-nav > li > a:hover{color:#462237; background:url(../images/80-opacity-bg-fill.png) repeat;}
#toggle{
- display:block;
- background:#000;
- color:#fff;
- max-width:60px;
- height:30px;
- line-height:26px;
- text-decoration:none;
- text-align:center;
- outline:none;}
#toggle a{text-decoration:none; color:#fff; font-size:15px;}
My HTML:
- <div id="sub-content">
<div id="sub-nav">
<div class="clear">
<ul class="sub-nav">
<li class="selected"
>
<a href="call-us/">Call Us</a>
</li>
</ul>
</div>
</div>
<div id="toggle">
<a id="open" class="open" href="#">↓ Menu</a>
<a id="close" style="display: none;" class="close" href="#">↑ Menu</a>
</div>
</div>
and my JS
- <script type="text/javascript">
$(document).ready(function() {
$('#buttonOne').jFav();
$("#open").click(function(){
$("#sub-nav").slideDown("555");
});
$("#close").click(function(){
$("#sub-nav").slideUp("555");
});
$("#toggle a").click(function () {
$("#toggle a").toggle();
});
});
</script>
Thanks for looking, hope you can help.
[UPDATE]
I have found the problem was because of having a min-height set.
If anyone has a solution I could use to find the height of the menu once
it has 'rendered/parsed' and apply that to the js
that would really be appreciated, thanks.
[EXTRA EDIT]
Ok no need for js/jq I just inserted another div with a min height which
gives the div I want to affect a height for the jq to use
SOLVED