Mini Shell

Direktori : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/moodle/theme/learnr/amd/build/
Upload File :
Current File : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/moodle/theme/learnr/amd/build/backtotopbutton.min.js

/**
 * Theme LearnR - JS code back to top button
 *
 * @module     theme_learnr/backtotopbutton
 * @copyright  2022 Alexander Bias, lern.link GmbH <[email protected]>
 * @copyright  on behalf of Zurich University of Applied Sciences (ZHAW)
 * @copyright  based on code from theme_boost_campus by Kathrin Osswald.
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
define("theme_learnr/backtotopbutton",["jquery","core/str","core/notification"],(function($,str,Notification){let buttonShown=!1;function initBackToTop(){let stringsPromise=str.get_string("backtotop","theme_learnr");$.when(stringsPromise).then((function(string){return $("#page-footer").after('<button id="back-to-top" class="btn btn-icon bg-secondary icon-no-margin d-print-none"aria-label="'+string+'"><i aria-hidden="true" class="fa fa-chevron-up fa-fw "></i></button>'),$("#page").on("scroll",(function(){$("#page").scrollTop()>220?!1===buttonShown&&$("#back-to-top").fadeIn(300,(function(){buttonShown=!0})):!0===buttonShown&&$("#back-to-top").fadeOut(100,(function(){buttonShown=!1}))})),$("#back-to-top").on("click",(function(event){event.preventDefault(),$("#page").animate({scrollTop:0},500),$("#back-to-top").blur()})),!0})).fail(Notification.exception)}return{init:function(){initBackToTop()}}}));

//# sourceMappingURL=backtotopbutton.min.js.map

Zerion Mini Shell 1.0