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() { $(document).ready(function() {
$('.component-links a').click(function() { $('.component-links a').history(function() {
var comp = $(this).attr('href').replace(/^#/, ""); loadDemo( $(this).attr('href').replace(/^#/, "") );
loadDemo(comp);
}); });
// hash listener
if (location.hash) {
loadDemo(location.hash.replace(/^#/, ""));
}
$.ajaxHistory.initialize(); $.ajaxHistory.initialize();
}); });