Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/restaurant-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbit <j@mailb.org>2020-01-04 18:26:36 +0300
committerGitHub <noreply@github.com>2020-01-04 18:26:36 +0300
commit817df9453a46d01d8a4ce83c3ae16b880d983a56 (patch)
tree18f391e40679cab7517bec8b1e7a887dad3a8022
parent1585e442bf895ea7ee026d0f60e0debec7dedb15 (diff)
Firefox does not fire load after $(document).ready
to fade out preload in Firefox, $(window).on('load', function () { must be defined early enough
-rw-r--r--static/js/main.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/static/js/main.js b/static/js/main.js
index ec23bf9..0bc59d3 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -1,9 +1,9 @@
-$(document).ready(function () {
+// Preloader js
+$(window).on('load', function () {
+ $('.preloader').fadeOut(100);
+});
- // Preloader js
- $(window).on('load', function () {
- $('.preloader').fadeOut(100);
- });
+$(document).ready(function () {
// autohiding navbar on mobile devices
$('.navbar-collapse a').click(function () {
@@ -76,4 +76,4 @@ $(document).ready(function () {
//Initiat WOW JS
new WOW().init();
-}); \ No newline at end of file
+});