functional demos: fixed remote history plugin usage

This commit is contained in:
Jörn Zaefferer 2008-10-13 16:50:57 +00:00
parent e24e2aeb7b
commit 59109b7894

View File

@ -1,15 +1,9 @@
$(document).ready(function() {
$('.component-links a').click(function() {
var comp = $(this).attr('href').replace(/^#/, "");
loadDemo(comp);
$('.component-links a').history(function() {
loadDemo( $(this).attr('href').replace(/^#/, "") );
});
// hash listener
if (location.hash) {
loadDemo(location.hash.replace(/^#/, ""));
}
$.ajaxHistory.initialize();
});