diff --git a/demos/functional/js/behaviour.functionaldemos.js b/demos/functional/js/behaviour.functionaldemos.js index 19393476c..46ed6c97b 100644 --- a/demos/functional/js/behaviour.functionaldemos.js +++ b/demos/functional/js/behaviour.functionaldemos.js @@ -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(); }); \ No newline at end of file