Commit 433119af authored by Maxym Borodenko's avatar Maxym Borodenko

When user goes to the next page, the page doesn't scroll up.

parent 5181653c
......@@ -6143,7 +6143,7 @@ table.accessions {
display: none;
}
.letter-anchor {
.letter-anchor, .table-anchor {
display: block;
height: 79px;
margin-top: -79px;
......
......@@ -163,6 +163,7 @@
</div>
</div>
<div id="content-area" class="col-lg-10 col-md-9 col-sm-9 col-xs-12 explore-table">
<span id="table-top" class="table-anchor"></span>
<table class="accessions">
<thead>
<tr>
......@@ -547,12 +548,16 @@
$(this).find("a").on("click", function (e) {
e.preventDefault();
applyFilters($(e.target).attr("href"));
var tableToScrollTo = $('#table-top')[0];
tableToScrollTo.scrollIntoView();
});
});
$("nav.text-center").find("form").on("submit", function (e) {
e.preventDefault();
applyFilters("?" + $(this).serialize());
var tableToScrollTo = $('#table-top')[0];
tableToScrollTo.scrollIntoView();
});
$(".results-per-page").on("change", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment