PHP Classes

File: themes/default/assets/local/js/scripts.min.js

Recommend this page to a friend!
  Classes of Aby Dahana   Aksara   themes/default/assets/local/js/scripts.min.js   Download  
File: themes/default/assets/local/js/scripts.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Version update
Date: 5 days ago
Size: 1,589 bytes
 

Contents

Class file image Download
/** * A script library to import the javascript / css file on the fly * * @author Aby Dahana <abydahana@gmail.com> * @copyright (c) Aksara Laboratory <https://aksaracms.com> * @license MIT License * * This source file is subject to the MIT license that is bundled with this * source code in the LICENSE.txt file. */ "use strict"; const prevScrollpos = window.pageYOffset; /** * Hide navbar on scroll down, restore on scroll up. * Applied only when navigation menu has id "hide-on-scroll" */ window.onscroll = function() { var currentScrollPos = window.pageYOffset, navbar = document.getElementById('hide-on-scroll'); if (navbar && window.navigator.userAgent.indexOf('Trident/') === -1) { if (prevScrollpos > currentScrollPos) { navbar.style.top = 0; navbar.nextElementSibling.style.top = 0; } else if (currentScrollPos > navbar.offsetHeight) { navbar.style.top = '-' + navbar.offsetHeight + 'px'; navbar.nextElementSibling.style.top = '-' + navbar.offsetHeight + 'px'; } prevScrollpos = currentScrollPos; } }; $(document).ready(function() { $('.carousel').on('slide.bs.carousel', function (e) { var nextHeight = $(e.relatedTarget).height(); $(this).find('.active.carousel-item').parent().animate ({ height: nextHeight }, 500); }); if ($('[role=announcements]').length) { $('body').css ({ paddingBottom: 40 }) } });