Skip to content

Commit

Permalink
set auto-scroll on search results to container-parent
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Jul 8, 2024
1 parent 9999337 commit bd7caf4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $(function() {
// Replace only tab-pane
$('.search-results .tab-content').html( hb_results_html );
}
$('html, body').animate({scrollTop: $("#search_results").offset().top }, 1000);
$('html, body').animate({scrollTop: $("#container_results").offset().top }, 1000);

//# Add pagination ###################
var fn = (pageIndex) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</div>

<div class="container-fluid">
<div class="container">
<div class="container" id="container_results">
<section id="search_results" class="search-results content-tabs">
</section>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $(function() {
// Replace only tab-pane
$('.search-results .tab-content').html( hb_results_html );
};
$('html, body').animate({scrollTop: $("#search_results").offset().top }, 1000);
$('html, body').animate({scrollTop: $("#container_results").offset().top }, 1000);

//# Add pagination ###################
var fn = (pageIndex) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

<div class="container-fluid">

<div class="container">
<div class="container" id="container_results">
<section id="top_results"></section>
<section id="search_results" class="search-results content-tabs"></section>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $(function() {
var total = res_processed.total;
var hb_results_html = hb_results_tmpl(res_processed);
$('.search-results').html( hb_results_html );
$('html, body').animate({scrollTop: $("#search_results").offset().top }, 1000);
$('html, body').animate({scrollTop: $("#container_results").offset().top }, 1000);

//# Add pagination ###################
var fn = (pageIndex) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</div>

<div class="container-fluid">
<div class="container">
<div class="container" id="container_results">
<section id="search_results" class="search-results content-tabs">
</section>
</div>
Expand Down

0 comments on commit bd7caf4

Please sign in to comment.