Tuesday 4 December 2012

jQuery SlideDown() / SlideUp() With Bottom-Positioned Elements

jQuery SlideDown() / SlideUp() With Bottom-Positioned Elements jQuery SlideDown() / SlideUp() With Bottom-Positioned Elements
Here is the example - click on the below link see effect.
Click here to show Div With SlideDown
Check it out! This DIV is positioned based on its very sexy Bottom and then is opened using a slide-down animation effect (and closed using a slide-up) animation effect.

code goes here :
step 1 : copy and paste below code in notepad and save as example.html
step 2 : open it in browser.
<!DOCTYPE HTML>
<html>
<head>
<title>jQuery SlideDown() / SlideUp() With Bottom-Positioned Elements</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function(){
$('.slideupdwn').click(function() {
$('#container').slideToggle();
});
});
</script>
</head>
<body>
<p>jQuery SlideDown() / SlideUp() With Bottom-Positioned Elements</p>
<p><span class="slideupdwn"><a href="#">Show Div With SlideDown</a></span></p>
<div id="container">
<div id="inner">
Check it out! This DIV is positioned based on its
very sexy Bottom and then is opened using a slide-down
animation effect (and closed using a slide-up)
animation effect.
</div>
</div>
<style type="text/css">
#container {
            bottom: 0px ;
            left: 20px ;
            position:relative ;
            width: 50% ;
            display:none;
            }
#inner {
            background-color: #F0F0F0 ;
            border: 1px solid #666666 ;
            border-bottom-width: 0px ;
            padding: 20px 20px 100px 20px ;
        }
</style>
</body>
</html>

No comments:

Post a Comment

Do you think it could be useful for you? Share your thoughts with us!