Smoothly scroll to alias edit form.
This commit is contained in:
parent
64220292f1
commit
57f8ee0b09
1 changed files with 7 additions and 1 deletions
|
@ -58,7 +58,7 @@
|
|||
<table>
|
||||
<tr id="alias-template">
|
||||
<td class='actions'>
|
||||
<a href="#" onclick="aliases_edit(this); document.location += #panel_aliases'; return false;" class='edit' title="Edit Alias">
|
||||
<a href="#" onclick="aliases_edit(this); scroll_top(); return false;" class='edit' title="Edit Alias">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
<a href="#" onclick="aliases_remove(this); return false;" class='remove' title="Remove Alias">
|
||||
|
@ -189,4 +189,10 @@ function aliases_remove(elem) {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
function scroll_top() {
|
||||
$('html, body').animate({
|
||||
scrollTop: $("#panel_aliases").offset().top
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue