doevisualizations
Version:
Data Visualization Library based on RequireJS and D3.js (v4+)
27 lines (24 loc) • 843 B
HTML
<html lang="en">
<head>
<title>remove demo</title>
<style type='text/css'>#clickToDestroy { padding: 5px; border: solid 1px;width: 200px;}</style>
</head>
<body>
<div id='demo-html'>
<div id='clickToDestroy'>Click Below to remove me</div>
<a id='change' href="javascript://">Click here!</div>
</div>
<script type='text/javascript' src='../../node_modules/steal/steal.js' main='@empty'></script>
<script type="text/javascript">
steal("jquerypp/event/removed",function() {
$("#clickToDestroy").bind("removed", function(){
$("#change").html("removed with "+$(this).data("testData"));
}).data("testData","joy :)");
$("#change").bind("click", function(){
$("#clickToDestroy").remove();
});
});
</script>
</body>
</html>