Created
December 28, 2010 18:24
-
-
Save ionas/757510 to your computer and use it in GitHub Desktop.
reduced functionality of: https://gist.github.com/755139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| $('#products_search input').keyup(function() { | |
| $.bbq.pushState($('#products_search').serialize() + '&page=1'); | |
| }, 250); | |
| }); | |
| $('#products th a, #products .pagination a').live('click', function(e) { | |
| e.preventDefault(); | |
| $.bbq.pushState($.param.querystring(this.href)); | |
| }); | |
| $(window).bind('hashchange', function() { | |
| $.getScript($.param.querystring(document.location.href, $.param.fragment())); | |
| }); | |
| $(window).trigger('hashchange'); | |
| }); | |
| // TODO: changing the hash by hand does not work (jumps to last history) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment