Skip to content

Instantly share code, notes, and snippets.

@jefflarkin
Created August 6, 2009 16:11
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 jefflarkin/163394 to your computer and use it in GitHub Desktop.
Save jefflarkin/163394 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset/reset-min.css"/>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css"/>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/base/base-min.css"/>
<style media="all" type="text/css">
#admin {
position: absolute;
top: 25%;
right: 5px;
min-height: 250px;
float: right;
z-index: 100;
width: auto;
height: auto;
background: #666;
text-align: center;
}
#admin_tab {
position: absolute;
float: left;
height: 20px;
width: 70px;
left: -50px;
top: 25px;
background: #666;
color: #fff;
padding: 5px;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
#admin_tab a {
text-decoration: none;
color: #fff;
font-weight: bold;
}
#admin_content {
overflow: hidden !important;
width: 0px;
}
#admin_content div {
width: 150px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#admin_tab a").click(function(){
if ($("#admin_content").css("width") == "0px" ) {
$("#admin_content").effect("size", {to: {width: "150px"}}, "slow");
$("#admin").effect("size", {to: {width: "150px"}}, "slow");
} else {
$("#admin_content").effect("size", {to: {width: "0px"}}, "slow");
$("#admin").effect("size", {to: {width: "0px"}}, "slow");
}
});
});
</script>
</head>
<body>
<div id="admin">
<div id="admin_tab">
<a href="#">Admin</a>
</div>
<div id="admin_content">
<div>
Content
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment