Created
July 31, 2011 11:42
-
-
Save chico/1116723 to your computer and use it in GitHub Desktop.
Growl Notification for New Web Visitors
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> | |
<script src="http://stanlemon.net/javascript/jquery.jgrowl.js" type="text/javascript"></script> | |
<script src="https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js" type="text/javascript"></script> | |
<link rel="stylesheet" href="http://stanlemon.net/stylesheet/jquery.jgrowl.css" type="text/css"/> | |
<style> | |
.jGrowl a {color:yellow; text-decoration: none;} | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
$(function () { | |
if($.cookie("new_visitor") != "true") { | |
$.cookie("new_visitor", "true", { expires: 365, path: '/' }); | |
$.jGrowl("Hello. New visitor?<br/><br/><a href='#'>Register</a>", {sticky: true}); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment