Full-width not working
-
Hi!
I was trying to use the plugin for my website, but it doesn’t work properly. When I make my row full-width the slider still appears with the with of a normal row. If I zoom out to 90% (with ctrl -/+) it fixes. How can I fix that?
-
Check for any JavaScript errors first (by pressing CTRL+SHIFT+J withing Chrome or FF). Otherwise, send me the URL of the page where this is happening.
Thank you for youк responce.
http://beta.rhaskills.com/home-page/
I don’t see any errors…Hmmm, a bit strange – its setting your slide width to the boxed width of your theme.
Try this CSS in your ‘style.css’ file:#home_main_slider .owl-item {
width:100% !important;
}Also, try disabling the ‘Allow Shortcodes’ checkbox within your slider settings.
Setting CSS won’t work because container width and translate3d parameters are also wrong and are calculated with javascript dynamically. I could set container’s width to 200%, and sliders’ width to 50% but that will stop working when I add or delete another slide. Moreover all the slides exept for the first will be cut becouse translate3d is calculated in javascript and believes that the width should be equal to the fixed-width-container of my webpage. Disabling the ‘Allow Shortcodes’ checkbox didn’t help.
It would be really nice if one of the newer versions would have the ability to make the full-width sliders in any case.Maybe it’s possible to insert slideshow in another way? MB javascript function? I believe the problem happens because the gallery loads too early.
There also should be a function like “updatePosition” for updating all parameters in owl-carowsel. Because everything fixes when I change browser width.
-
This reply was modified 9 years, 1 month ago by
i692922.
Hi, I’ve used Slide Anything on other sites (built with Visual Composer and DIVI pagebuilders) within full-width sections without any issue in the past.
Also the JavaScript code for each Slide Anything slider is executed by the jQuery document “ready” event, which executes when the DOM has fully loaded. I’m thinking that maybe your theme is also executing jQuery to resize page wrapper elements after the DOM has loaded and this is executing after the Slide Anything JS.
What you could try is changing the Slide Anything document “ready” event to a window “load”. Within the file “/wp-content/plugins/slide-anything/php/slide-anything-frontend.php” at line 222 you will see the line:
$output .= ” jQuery(document).ready(function() {\n”;
Change this to:
$output .= ” jQuery(window).load(function() {\n”;I believe window “load” event fires after document “ready” event, so maybe you could try this and let me know how it goes – I’ll then update a future Slide Anything release with this change. Thanks.
Hi! Thank you for your support.
What you’ve advised stopped plugin from working at all. Screenshot: https://www.dropbox.com/s/fhdcwqq53t1yg9p/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202017-04-21%2013.29.41.png?dl=0
I’ve updated owl to the newest version – didn’t help.
Moreover, somehow owl callbacks don’t work all. I wanted to trigger resize.owl.carousel on load – didn’t work. I wanted to run a function on onInitialized callback – didn’t work. I’ve modified slide-anything-frontend.php to create an alert on onInitialized callback stricktly as it is here (https://owlcarousel2.github.io/OwlCarousel2/demos/events.html) – didn’t work.
May the plugin be blocking owl carousel’s callbacks? Any other ideas?
-
This reply was modified 9 years, 1 month ago by
The topic ‘Full-width not working’ is closed to new replies.