modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
17 lines (15 loc) • 307 B
HTML
<html>
<head>
<meta charset="utf-8" />
<title>hashchange test</title>
</head>
<body style="background:red;overflow:hidden;">
<script>
addEventListener('hashchange', function() {
document.body.style.background = 'lime';
}, false);
location.hash = Math.random();
</script>
</body>
</html>