I'm really stuck on this I found two other posts about this but nothing has worked.
Basically I set the direction of my Splide slider to RTL and every-time it brings in the next set of slides they flicker in and out.
The slider is set to autoplay using the autoplay extension.
This is the URL https://prismfly.webflow.io/
Here's the code:
const one = new Splide( '.splide', {
type : 'loop',
drag : false,
autoWidth: true,
pauseOnHover: false,
pagination: false,
arrows: false,
pauseOnFocus: false,
direction:"rtl",
autoScroll: {
pauseOnHover: false,
pauseOnFocus: false,
speed: 1.3,
},
} );
Hoping someone else has experienced this before. Would love any help or suggestions, thank you
Hi so to solve the flickering issue in splide js you have to add some custom css:
.splide--track {
Direction:rtl;
}
If this didn't work so find the class of the splide track and set direction to rtl
Also set the width of the splide container to 100%
Hope this solves ur issue.
Related
I'm trying to make a navigation menu. I want to change active menu item by dragging, scrolling and clicking. I'm using swiper library and it's very useful but I have a problem. There is no trouble with clicking or scrolling but when I drag and release the menu, looping stops at last item. I want it to keep looping until it slows down and stops. Here is my JS-fiddle example.
$(document).ready(function() {
var menu = new Swiper("#menu", {
direction: "vertical",
centeredSlides: true,
loop: true,
slideToClickedSlide: true,
slidesPerView: 7,
mousewheel: {
enabled: true,
},
freeMode: true,
freeModeSticky: true,
freeModeMomentumRatio: 0.8,
freeModeVelocityRatio: 0.8,
freeModeMinimumVelocity: 0.2,
grabCursor: true
});
});
I found this similar issue on swiper's github page but the owner says:
This is by Swiper architecture design as it doesn't do any loop or
anything else during transition.
So I need to find an external solution. And also I don't have to use swiper despite I like it. I tried to use a couple of carousel libraries but I couldn't manage to fix my problem. Any suggestion is welcome.
I downloaded a template for owl.carousel.min.js - I have no idea how to add autoplay and arrows.
It's on a test server on http://testing.r2group.co.za/Test/index.html about halfway down. I would appreciate ANY help, as I'm proficient with HTML, but the JS is beyond me. (why I downloaded a template)
Have you found documentation for how to use the carousel? That is a good place to start.
The owl is part of a theme I am using. Looks like this javascript is included after the carousel.
<script>
jQuery(function($){
$("#latest_news .owl-carousel").owlCarousel({
lazyLoad: true,
responsiveRefreshRate: 50,
slideSpeed: 500,
paginationSpeed: 500,
scrollPerPage: true,
stopOnHover: true,
rewindNav: true,
rewindSpeed: 600,
pagination: true,
navigation: false,
autoPlay: true,
singleItem: true
});
});
</script>
This tells the browser to start a new script with jQuery.
jQuery(function($){
//code
});
Inside this function is specific to Owl Carousel.
$("latest_news .owl-carousel") selects the proper element. This is where you will use your own CSS selectors to get your slider.
It is being passed a javascript object of parameters for the slider. For your autoplay, you can give it
$("#YOUR-ELEMENT .owl-carousel").owlCarousel({
autoplay: true
});
The arrows are also described by a setting in this object. Looks like the left/right arrows can be added like this:
$("#YOUR-ELEMENT .owl-carousel").owlCarousel({
navigationText:["<i class='icon-left-open'></i>","<i class='icon-right-open'></i>"]
});
So, at a minimum to get your arrows and autoplay, your script should look like this:
<script>
jQuery(function($){
$("#YOUR-ELEMENT .owl-carousel").owlCarousel({
autoplay: true,
navigationText:["<i class='icon-left-open'></i>","<i class='icon-right-open'></i>"]
});
});
</script>
It would be worth looking at which other settings you can change for greater customization. The slideSpeed and rewindSpeed, for example, could be a good place to get familiar playing with javascript.
I am using slick plugin and I have problem with centering items when there is only one element. My code:
$('#divId').slick({
dots: false,
infinite: true,
speed: 300,
slidesToShow: 1,
centerMode: true,
variableWidth: true
});
If I have few elements in the container everything is OK (centerMode works great) but when I have only one element in slick queue - it goes to the right hand side.
Real example
I couldn't reproduce that problem on jsfiddle. I coppied my code there but everything seems to be ok there: jfFiddle
Does anybody know where is the problem ?
Thanks in advance.
I've tried all manner of things based on the documentation but no matter what I do, I can't seem to make it pause.
Here's what the documentation says:
slider.pause() //Function: Pause slider slideshow interval
slider.play() //Function: Resume slider slideshow interval
But it doesn't specify how to define the slider variable. I've tried:
var slider = $('.flex-slider').flexslider({
animation: "slide",
easing: "swing",
direction: "horizontal",
animationLoop: true,
slideshow: true,
animationSpeed: 600,
slideshowSpeed: 1200,
controlNav: false,
directionNav: false,
pausePlay: false
});
$('.pause-button').on('click',function({
slider.pause();
});
Which resulted in... http://puu.sh/4qpo3.png
And I've tried:
$('.flex-slider').flexslider().pause();
Which resulted in... http://puu.sh/4qpcS.png
And I've tried:
$('.flex-slider').flexslider().pause(true);
Which resulted in... http://puu.sh/4qpcS.png
And all in all I'm just not seeing what exactly I'm doing wrong here.
Anyone wanna provide some insight? :)
Try $('.flex-slider').flexslider('pause') and $('.flex-slider').flexslider('play').
Hi I see you turned off the option
pausePlay: false
Now edit few thing. first turned on the option
pausePlay: true,
pauseText :"Pause",
playText :"Play",
Now you will see a play pause text comes in the slider, with having two different classes for pay and pause, just add your icon image to that class with css. and you will have you desired functionality.
I have a problem with SlidesJS plugin in my wordpress theme.
Gallery is working but when the page load in the chrome it doesnt show the first slide correctly but next slide is okay. It works properly in FF, Opera and even IE 8. Sometimes it loads correctly but most of the time it doesnt.
If anyone knows a solution please help me. Thank you.
jQuery code:
jQuery(document).ready(function() {
jQuery("#gallery-68").slides({
pagination: true,
preload: true,
preloadImage: "http://themes.pixlito.com/Simplio/wp-content/themes/Simplio/images/ajax-loader.gif",
generatePagination: true,
crossfade: true,
effect: "fade",
bigTarget: true,
hoverPause: true,
autoHeight: true,
play: 10000
});
});
Fixed. Problem was that I didn't specify width and height in the "img" tag.