xxxxxxxxxx
<html>
<head>
<title>d3.js animation pattern</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="vis.js"></script>
<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, sans-serif
}
h1 {
font-weight: 300;
margin-left: 2em;
}
.bar {
fill: rgba(51, 51, 51, 0.5);
}
</style>
</head>
<body>
<h1><a href="https://en.wikipedia.org">Click here</a>, and then hit the Back Button (no animation)</h1>
<div id="canvas"></div>
<form>
<input id="back_detect" type="hidden" name="back_detect" />
</form>
</body>
<script type="text/javascript">
/* Render vis, animating only if the value of the field is "" */
vis("#canvas", $("#back_detect").val() == "");
/*
* Set the value of the form field to "visited". Most browsers will preserve
* this when the user navigates with the back button.
*/
$("#back_detect").val("visited");
</script>
</html>
Modified http://d3js.org/d3.v2.js to a secure url
https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
https://d3js.org/d3.v2.js