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 { ...@@ -6143,7 +6143,7 @@ table.accessions {
display: none; display: none;
} }
.letter-anchor { .letter-anchor, .table-anchor {
display: block; display: block;
height: 79px; height: 79px;
margin-top: -79px; margin-top: -79px;
......
...@@ -163,6 +163,7 @@ ...@@ -163,6 +163,7 @@
</div> </div>
</div> </div>
<div id="content-area" class="col-lg-10 col-md-9 col-sm-9 col-xs-12 explore-table"> <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"> <table class="accessions">
<thead> <thead>
<tr> <tr>
...@@ -547,12 +548,16 @@ ...@@ -547,12 +548,16 @@
$(this).find("a").on("click", function (e) { $(this).find("a").on("click", function (e) {
e.preventDefault(); e.preventDefault();
applyFilters($(e.target).attr("href")); applyFilters($(e.target).attr("href"));
var tableToScrollTo = $('#table-top')[0];
tableToScrollTo.scrollIntoView();
}); });
}); });
$("nav.text-center").find("form").on("submit", function (e) { $("nav.text-center").find("form").on("submit", function (e) {
e.preventDefault(); e.preventDefault();
applyFilters("?" + $(this).serialize()); applyFilters("?" + $(this).serialize());
var tableToScrollTo = $('#table-top')[0];
tableToScrollTo.scrollIntoView();
}); });
$(".results-per-page").on("change", function () { $(".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