Created
May 20, 2012 21:00
-
-
Save bkvirendra/2759522 to your computer and use it in GitHub Desktop.
A web page created at CodePen.io
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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Facebook Like Alert · CodePen</title> | |
<style> | |
#alert { | |
position: fixed; | |
display: none; | |
left: 50%; | |
margin-left: -300px; | |
top: 100px; | |
width: 600px; | |
text-align: center; | |
height: auto; | |
background: #eee; | |
padding: 30px 10px; | |
font-family:'Handlee',sans-serif; | |
font-size: 28px; | |
font-weight: bold; | |
border-radius: 10px; | |
box-shadow: 0px 5px 15px #333; | |
-webkit-box-shadow:0px 5px 15px #333; | |
-moz-box-shadow: 0px 5px 15px #333; | |
border:10px solid rgba(0, 0, 0, .5); | |
background-clip: padding-box; | |
text-shadow:0px 1px 0px # FFF; | |
cursor: default; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="alert"> | |
<div id="alertText"></div> | |
</div> | |
<button>Click Me</button> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
(function() { | |
function alert(textToshow, timeToShow) { | |
$("#alertText").html(textToshow); | |
$("#alert").fadeIn(1000, function () { | |
$("#alertText").fadeIn(700); | |
}); | |
setTimeout(function () { | |
hideAlert(); | |
}, timeToShow); | |
} | |
function hideAlert() { | |
$("#alert").fadeOut(700); | |
} | |
$(document).ready(function () { | |
alert("Loading...", 5000); | |
}); | |
$("button").click(function () { | |
alert("You Clicked Me...", 5000); | |
}); | |
})(); | |
</script> | |
</body> | |
</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
<div id="alert"> | |
<div id="alertText"></div> | |
</div> | |
<button>Click Me</button> |
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
function alert(textToshow, timeToShow) { | |
$("#alertText").html(textToshow); | |
$("#alert").fadeIn(1000, function () { | |
$("#alertText").fadeIn(700); | |
}); | |
setTimeout(function () { | |
hideAlert(); | |
}, timeToShow); | |
} | |
function hideAlert() { | |
$("#alert").fadeOut(700); | |
} | |
$(document).ready(function () { | |
alert("Loading...", 5000); | |
}); | |
$("button").click(function () { | |
alert("You Clicked Me...", 5000); | |
}); |
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
#alert { | |
position: fixed; | |
display: none; | |
left: 50%; | |
margin-left: -300px; | |
top: 100px; | |
width: 600px; | |
text-align: center; | |
height: auto; | |
background: #eee; | |
padding: 30px 10px; | |
font-family:'Handlee',sans-serif; | |
font-size: 28px; | |
font-weight: bold; | |
border-radius: 10px; | |
box-shadow: 0px 5px 15px #333; | |
-webkit-box-shadow:0px 5px 15px #333; | |
-moz-box-shadow: 0px 5px 15px #333; | |
border:10px solid rgba(0, 0, 0, .5); | |
background-clip: padding-box; | |
text-shadow:0px 1px 0px # FFF; | |
cursor: default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment