PHP Classes

File: public/public/assets/frontend/js/frontend-main.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   LaraCMS   public/public/assets/frontend/js/frontend-main.js   Download  
File: public/public/assets/frontend/js/frontend-main.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: LaraCMS
Content management system based on Laravel
Author: By
Last change:
Date: 2 years ago
Size: 667 bytes
 

Contents

Class file image Download
$(document).ready(function () { /** * Scroll To Top Action */ // declare variable var scrollTop = $(".scrollTop"); $(scrollTop).css("opacity", "0"); $(window).scroll(function () { // declare variable var topPos = $(this).scrollTop(); // if user scrolls down - show scroll to top button if (topPos > 100) { $(scrollTop).css("opacity", "1"); } else { $(scrollTop).css("opacity", "0"); } }); // scroll END //Click event to scroll to top $(scrollTop).click(function () { $("html, body").animate( { scrollTop: 0, }, 800 ); return false; }); // click() scroll top EMD });