pmd/docs/_includes/custom/panel_scroll.html

27 lines
901 B
HTML
Raw Normal View History

2018-05-27 19:55:42 +02:00
<script src="../../js/jquery-ui.min.js"></script>
2018-06-12 14:57:19 +02:00
<script type="text/javascript">
2018-05-27 19:55:42 +02:00
// Adds a pretty animation to links to shuffle panels
$(function () {
$('a[href^=#shuffle-panel]').click(function () {
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '')
&& location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
2018-06-12 14:57:19 +02:00
$('#topbar-content-offset').animate({
scrollTop: $('#grid-rule').position().top
2018-05-27 19:55:42 +02:00
}, {
duration: 500,
complete: function () {
target.effect("highlight", {}, 1000);
}
});
return false;
}
}
});
});
</script>