Skip to content

Instantly share code, notes, and snippets.

@arturdent
Created March 30, 2012 03:31
Show Gist options
  • Save arturdent/2246238 to your computer and use it in GitHub Desktop.
Save arturdent/2246238 to your computer and use it in GitHub Desktop.
popup
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Popup Model</title>
<link rel="stylesheet" href="style.css">
<!--HTML5 Shiv-->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="js/jquery.reveal.js"></script>
</head>
<body>
<a href="#" id="button">Click me</a>
<div id='modal'>
<div id='heading'>
<h2>Are you sure you want to do that?</h2>
<a href="#" class='cancel close'><h2>close</h2></a>
</div><!-- /header -->
<div id='content'>
<p>Clicking yes will make Comic Sans your new system<br> default font. Seriously, have you thought this through?</p>
<a href="#" class="button green close"><img src="images/tick.png">Yes, do it now!</a>
<a href="#" class="button red close"><img src="images/cross.png">No, I’m insane!</a>
</div>
</div><!-- /modal -->
<script>
$(function() {
$('#button').click(function(e) {
$('#modal').reveal({
animation: 'fade',
animationpeed: 600,
closeonbackgroundclick: true,
dismissmodalclass: 'close'
});
return false;
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment