Home › Forums › Basel support forum › How to prevent "jump-load" when loading home page first time
How to prevent "jump-load" when loading home page first time
- This topic has 7 replies, 2 voices, and was last updated 6 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
February 6, 2018 at 10:16 pm #37897
vinirossiParticipantI have noticed that page loading does not look elegant on home page especially when using a slider (in the header). Although slider revolution has a built-in preloading feature, the page load jumps. This means: first the lower sections of the page are loaded and shown then slider revolution loads, preloading is shown (with preloading spinner) and then the whole slider is loaded inclusive compressed jpges.
How could I force to load first slider and then the rest of the page? Or better: How to include a full page preloading? I have bad experience (in SEO) with full page ajax loading plugins though…
February 7, 2018 at 7:53 am #37933
Artem TemosKeymasterHi,
Unfortunately, there is no way to force the Revolution Slider loads first. You can try to set the fixed height for the slider to avoid this jump on page loading.
Regards
February 7, 2018 at 10:20 am #37972
vinirossiParticipantThanks. How have your resolved this on your demos?
February 7, 2018 at 12:43 pm #38025
Artem TemosKeymasterThis problem exists on our demo as well. Try to set the fixed height for the slider to fix this.
February 7, 2018 at 2:04 pm #38088
vinirossiParticipantCould not resolve this with fixed height.
Used Revolution Slider API instead:
//Set .site-content invisible to make "jump invisible"
jQuery(document).ready(function($) { //Hide jumping content above Slider $(".site-content").css('visibility', 'hidden'); });
//Set .site-content visible on slider event "loaded" revapi19.bind("revolution.slide.onloaded",function (e) { console.log("slider loaded"); jQuery(".site-content").css('visibility', 'visible'); });
February 7, 2018 at 2:31 pm #38109
Artem TemosKeymasterGreat, we are glad that you have found the solution.
February 7, 2018 at 3:43 pm #38149
vinirossiParticipantBetter Fix:
In functions.php:
add_filter( 'body_class','my_body_classes' ); function my_body_classes( $classes ) { if ( is_front_page() ) { $classes[] = 'has-revolution-slider'; } return $classes; }
In custom stylesheets:
body.has-revolution-slider .site-content { visibility: hidden; }
In Slider Revolution Slider Settings at Custom Javascript:
revapi19.bind("revolution.slide.onloaded",function (e) { console.log("slider loaded"); jQuery(".site-content").css('visibility', 'visible'); });
Replace revapi19 with your relevant slider variable (See within Slider Settings)
February 7, 2018 at 7:47 pm #38205
Artem TemosKeymasterThank you for sharing your experience here.
-
AuthorPosts
Tagged: page load, preloading
- You must be logged in to create new topics. Login / Register