Skip to content

Instantly share code, notes, and snippets.

@ionas
Created December 28, 2010 18:24
Show Gist options
  • Select an option

  • Save ionas/757510 to your computer and use it in GitHub Desktop.

Select an option

Save ionas/757510 to your computer and use it in GitHub Desktop.
reduced functionality of: https://gist.github.com/755139
$(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