code
jQuery bouncing header
Submitted by delaigle on Sat, 08/09/2008 - 20:16Here is the jQuery code and CSS to make the cool/annoying bouncing header!
jQuery Code
<script type="text/javascript"> $(document).ready(function() { $("#top-content").slideDown(1000). animate({height: "190px"}). animate({height: "200px"}). animate({height: "195px"}). animate({height: "200px"}, function() { $("#bottom-content").css({marginBottom:"20px"}); }); }); </script>
CSS
<style> #top-content { height: 200px; display: none; } </style>
Thats it! Have fun!
** Note **
Add new comment
Random Javascript Header
Submitted by delaigle on Tue, 04/03/2007 - 19:12Ok so I really wanted a random changing banner on the site that would not hinder page load so I decided to use javascript so that loading would be dependent on the users computer not the server, not to mention I really did not want to do this via php because well, I thought it would be best not to use the server to figure out which banner to use. So just in case anyone would like to do the same here is the code I used to do it.
recent comments
- That sucks
12 weeks 5 days ago - Awesome writeup.
12 weeks 5 days ago - its only a matter of time
25 weeks 4 days ago


