Skip to content

Instantly share code, notes, and snippets.

@ruckus
Created February 18, 2010 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruckus/308171 to your computer and use it in GitHub Desktop.
Save ruckus/308171 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://medpediamedia.com.s3.amazonaws.com/jquery.gbox.js" type="text/javascript"></script>
<style type="text/css">
.gbox_dialog, .gbox {
display: none;
border: 3px solid #00f;
margin: 40px;
}
</style>
</head>
<body>
<!-- gbox template -->
<div class="gbox" id="gbox_template">
<div class="gbox_dialog_title">
<span><!-- title gets inserted here --></span>
<div class="closer"><a href="javascript:void(0)" class="close">Cancel</a></div>
</div>
<div class="gbox_dialog_content"><!-- content gets inserted here --></div>
<div class="gbox_dialog_closer">
<a href="javascript:void(0)" class="close">Cancel</a>
</div>
</div>
<!-- create a couple of instances -->
<div id="aGbox" class="gbox_dialog">
<input type="hidden" class="gbox_title" value="My name is Methusaleh" />
<p>All ye who devour</p>
</div>
<div id="bGbox" class="gbox_dialog">
<input type="hidden" class="gbox_title" value="You gotta go down to go up!" />
<p>Encore</p>
</div>
<a href="javascript:void(0);" onclick="$('#aGbox_gbox').gbox_open()">Open aGbox</a>
<br /><br />
<a href="javascript:void(0);" onclick="$('#bGbox_gbox').gbox_open()">Open bGbox</a>
<script type="text/javascript">
$(document).ready(function() {
$('#aGbox').gbox_init_dialog({
onOpen: function(event, dialog) {
console.log('You would think you would see this when aGbox gets opened');
}
});
$('#bGbox').gbox_init_dialog({
onOpen: function(event, dialog) {
console.log('But this fucker always wins');
}
});
console.log('loaded gbox harem');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment