jquery-history

1.0.1 • Public • Published

forked from https://github.com/balupton/jquery-history


axisj-contributed

Dependencies

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.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>

Readme

Keywords

none

Package Sidebar

Install

npm i jquery-history

Weekly Downloads

156

Version

1.0.1

License

none

Last publish

Collaborators

  • thomasjang