Last active
January 9, 2020 23:13
-
-
Save simsketch/e6b8d41745577b8d7f41 to your computer and use it in GitHub Desktop.
Simple Growl Notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
text-align:center; | |
background:#000; | |
} | |
.growl-notice { | |
display:none; | |
font-family:Helvetica,Verdana,sans-serif; | |
width: 300px; | |
height: 65px; | |
padding: 5px 10px; | |
border-radius: 4px; | |
opacity: .97; | |
font-size: 14px; | |
color: #fff; | |
background: #BF0025; | |
position: fixed; | |
right: 10px; | |
bottom: 34px; | |
line-height:60px; | |
} | |
#activator { | |
text-decoration:none; | |
font-family:Courier New, sans-serif; | |
font-size:48px; | |
font-weight:bold; | |
color:#606060; | |
background:#272727; | |
padding:10px 20px; | |
-webkit-border-radius:10px; | |
border-radius:10px; | |
margin-top:40px; | |
display:inline-block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="simple-growl.css"> | |
</head> | |
<body> | |
<div class="growl-notice"></div> | |
<a href="#" id="activator" onclick="javascript:displayGrowl('Notification has been displayed.')">Click Me To View Growl</a> | |
</body> | |
<script src="simple-growl.js"></script> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function displayGrowl(message) { | |
$('.growl-notice').fadeIn().html(message); | |
setTimeout(function(){ | |
$('.growl-notice').fadeOut(); | |
}, 2000); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment