Skip to content

Instantly share code, notes, and snippets.

@mdjones
Created June 4, 2009 14:38
Show Gist options
  • Save mdjones/123652 to your computer and use it in GitHub Desktop.
Save mdjones/123652 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" lang="en" xml:lang="en">
<head><title>OncExpress:Analyze</title>
<link media="screen, projection" type="text/css" href="./include/blueprint/screen.css" rel="stylesheet">
<link rel="stylesheet" href="http://www.blueprintcss.org/blueprint/screen.css" type="text/css" media="screen, projection">
<style type="text/css" >
div.cart {
clear:both;
border:1px solid black;
padding:8px;
width:200px;
}
div.draggableFacet{
font-size:11px;
font-family:Verdana,sans-serif;
font-weight:bold;
text-align: center;
color:#888888;
width:100%;
background-color:#EEEEEE;
border-style:solid;
border-color:#BBBBBB;
border-width:1px;
float:left;
}
</style>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.droppable.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".draggableFacet").draggable();
});
</script>
</head>
<body>
<div class="container">
<div class="span-6">
<div id="facetHolder" class="cart" style="clear:left; height:132px;margin-top:10px;">
<div id="metastasis" class="draggableFacet">metastasis</div>
<div id="normal" class="draggableFacet">normal</div>
<div id="benign_neoplasia" class="draggableFacet">benign_neoplasia</div>
<div id="non_cancer" class="draggableFacet">non_cancer</div>
<div style="clear:both;"></div>
</div>
<script type="text/javascript">
//<![CDATA[
$("#facetHolder").droppable({ accept: '.draggableFacet', hoverclass:'cart-active',
drop:function(event, ui){
$(this).append( $(ui.draggable) );
$(ui.draggable).attr("style", "");
}
});
</script>
</div>
<div class="span-6 last">
Bad Drop Box
<div id="badDrop" class="cart" style="clear:left; height:132px;margin-top:10px;">
</div>
<script type="text/javascript">
//<![CDATA[
$("#badDrop").droppable({ accept: '.draggableFacet', hoverclass:'cart-active',
drop:function(event, ui){
$(this).append( $(ui.draggable) );
}
});
</script>
</div>
<div class="span-6 last">
Good Drop Box
<div id="goodDrop" class="cart" style="clear:left; height:132px;margin-top:10px;">
<script type="text/javascript">
//<![CDATA[
$("#goodDrop").droppable({ accept: '.draggableFacet', hoverclass:'cart-active',
drop:function(event, ui){
$(this).append( $(ui.draggable) );
$(ui.draggable).attr("style", "");
}
});
</script>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment