File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -397,22 +397,15 @@ <h3>LinkedIn</h3>
397397 </ div >
398398 </ section >
399399 </ div >
400-
401- <!-- =========================== back to top =========================== -->
402-
403400 </ main >
404401 </ div >
405402 </ div >
406403
407- <!-- <div>
408- <img id="btt" src="wp-content/Icon_Back_to_top.svg" alt="Back to top" tabindex="0" role="button">
409- </div> -->
410-
411- <!-- =========================== Additional Support / Footer links =========================== -->
404+ <!-- Footer -->
412405 < imscentral-footer > </ imscentral-footer >
413406
414407 <!-- post-load actions/listeners -->
415- < script src ="jekyll-tipue-search/assets/tipuesearch/postLoad.js "> </ script >
408+ <!-- < script src="jekyll-tipue-search/assets/tipuesearch/postLoad.js"></script> -- >
416409
417410 </ body >
418411</ html >
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ function createComponent(html) {
3030 shadow . innerHTML = html ;
3131
3232 const backToTopBtn = shadow . getElementById ( 'back-to-top' ) ;
33+ // Display button on scroll
3334 window . onscroll = ( ) => {
3435 if ( document . body . scrollTop > 450 || document . documentElement . scrollTop > 450 ) {
3536 backToTopBtn . style . opacity = '1' ;
@@ -40,12 +41,14 @@ function createComponent(html) {
4041 }
4142 }
4243
44+ // Go back to top on click
4345 backToTopBtn . addEventListener ( 'click' , ( ) => { this . scrollToTop ( ) } ) ;
4446 backToTopBtn . addEventListener ( 'keydown' , ( event ) => {
4547 if ( event . key === 'Enter' ) { this . scrollToTop ( ) } ;
4648 } ) ;
4749 }
4850
51+ // Auto-scrolls to top of page
4952 scrollToTop ( ) {
5053 document . body . scrollTop = 0 ;
5154 document . documentElement . scrollTop = 0 ;
You can’t perform that action at this time.
0 commit comments