mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
functional demos: fixed remote history plugin usage
This commit is contained in:
parent
e24e2aeb7b
commit
59109b7894
@ -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();
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user