jquery-history

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jquery-history
1.0.17 years ago7 years agoMinified + gzip package size for jquery-history in KB

Readme

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>