jquery-history-a
v1.0.2
Published
forked from https://github.com/balupton/jquery-history
Downloads
2
Readme
forked from https://github.com/balupton/jquery-history
Dependencies
Install
npm install jquery-history-a
bower install jquery-history-a
Examples
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jquery-history</title>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/ax5core/dist/ax5core.min.js"></script>
<script src="../dist/jquery.history-a.js"></script>
</head>
<body style="padding: 20px;">
<div id="demo">
<ul id="menu">
<li><a href="#/apricots">Learn about Apricots</a></li>
<li><a href="#/bananas">Lean about Bananas</a></li>
<li><a href="#/coconuts">Learn about Coconuts</a></li>
</ul>
</div>
<script>
$(function () {
// Bind a handler for ALL hash/state changes
$.History.bind(function (state) {
console.log(state);
});
// Bind a handler for state: apricots
/*
$.History.bind('/apricots', function (state) {
});
*/
});
</script>
</body>
</html>