javascript – jquery SlideToggle effect in upward direction?

javascript – jquery SlideToggle effect in upward direction?

Try following code Here is JSFIDDLE

<!DOCTYPE html>
<html>
<head>
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js>                 </script>
    <script>
    $(document).ready(function(){
     $(#flip).click(function(){
      $(#panel).slideToggle({
      direction: up
    }, 400);

 });
});
</script>
<style> 
#panel,#flip
{

position:absolute;
  bottom:0;
  width: 50%;
  padding-bottom:2%;
  z-index: 100;
opacity:0.8;
background-color:#b3171d;
}
 #panel
{
    display: none;
padding:50px;
background:url(maharani%20html/images/prince.jpg) no-repeat;
width:262px;
height:248px;

}
</style>
</head>
<body>
    <div>
    <div id=panel>Hello world!</div>
    </div>
    <div id=flip>Click to slide up panel</div>

 </body>
</html>

javascript – jquery SlideToggle effect in upward direction?

Leave a Reply

Your email address will not be published.