Jquery - setting toggleSlide to slide up on click?
I am currently learning jQuery and have set up a toggleSlide effect, at the moment I can only make the hidden content slide down, how can I make the content slide up? Whe开发者_高级运维n I place the link below the content nothing happens?
http://jsfiddle.net/kyllle/EQsVD/
Kyle
just read on the following code
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>Because time is valuable, value the time</p>
<p>time is money, Money is time .</p>
</div>
<p class="flip">Show/Hide Panel</p>
</body>
</html>
hope it will help take help from it
精彩评论