Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myVar;
- function showDiv() {
- var random = Math.floor(Math.random() * $('.notification').length);
- $('.notification').eq(random).prependTo('.container').fadeIn(200).delay(3000).fadeOut(200);
- createRandomInterval();
- }
- function createRandomInterval() {
- setTimeout(showDiv, 500 + Math.random() * 4000);
- }
- $(document).ready(function() {
- createRandomInterval();
- });
Add Comment
Please, Sign In to add comment