Remove Snap Back in OwlCarousel when using SinglePage setting - javascript

Currently I am experiencing a snap back from the last image to the first when OwlCarousel reaches the last image. I would prefare it to continuously repeat in the same direction.
Is there a setting for this?
Currently the code is:
g.owlCarousel({
navigation: false,
slideSpeed: 500,
items: 1,
pagination: false,
loop: true,
mouseDrag: false,
touchDrag: false,
autoPlay: true,
singleItem: true
});

Related

Owl Craousel + Animate.css - Animation dont work

I'm using owl carousel + animate.css to achieve an effect for my carousel but the code just doesn't work for me.
I want the first card to zoom out and disappear as the second card slides in.
Here is what I have tried so far.
https://codepen.io/whoisda/pen/eYEaVGd
$(document).ready(function() {
$("#owl-example").owlCarousel({
navigation: true,
navigationText: ["", ""],
singleItem: true,
loop: true,
autoplay: true,
animateIn: 'animate__fadeIn',
animateOut: 'animate__zoomOut',
items:4,
margin:30,
stagePadding:100,
smartSpeed:400,
slideSpeed: 300
});
});
I'm using :
animateOut: 'animate__zoomOut',
This is the design/animation should look something like this:
https://imgur.com/a/DFpR0bZ
Based on the plugin document:
You can not use animate with more than one item is displayed
if U use
$(document).ready(function() {
$("#owl-example").owlCarousel({
navigation: true,
navigationText: ["", ""],
singleItem: true,
loop: true,
autoplay: true,
animateIn: 'animate__fadeIn',
animateOut: 'animate__zoomOut',
items:1,
margin:30,
stagePadding:100,
smartSpeed:400,
slideSpeed: 300
});
});
it well be fine But show just one item
Visit https://owlcarousel2.github.io/OwlCarousel2/demos/animate.html
Animate functions work only with one item and only in browsers that support perspective property.

Swiperjs slows in the center

I am using Swiperjs as I am looking for an infinite looping swiper that never stops in the middle however I have tried many settings and cant seem to get it to work where it is the same speed and no jumping and no slowing down as it gets to the center.
Below is the best I have got it where it does not jump but it slows down as it gets into the center.
const params = {
loop: true,
speed: 5000,
freeMode: true,
freeModeFluid:true,
resistance: false,
simulateTouch: false,
waitForTransition: false,
centeredSlides: false,
freeModeMomentum: false,
freeModeMinimumVelocity: 0,
freeModeMomentumBounceRatio: 0,
freeModeMomentumBounce: false,
normalizeSlideIndex: false,
autoplay: {
delay: 1,
disableOnInteraction: true,
}
}

Release on Edges Scroll is not smooth

Hey I'm using swipper js to build a vertical slider!
The Intended Solution:
-> When building the slider , i want to release the mouse scroll as soon it reaches the first or last slide.
The Problems:
-> Sometimes it makes the page scroll and the slider at the same time (happened only a few times) when i lowered the swiper version to 4.5.1
-> Main problem happened when i was working with version 5.3.1, when reaching the first or last slide, it scrolled too suddently, and the transition wasn't smooth which caused some usability problems...
<script src="https://unpkg.com/swiper#5.3.1/js/swiper.min.js"></script>
Code:
Version 4.5.1
let productSwiper = new Swiper(".swiper-container--product", {
direction: "vertical",
loop: false,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
grabCursor: true,
speed: 1000,
paginationClickable: true,
parallax: true,
autoplay: false,
effect: "slide",
centerMode: false,
mousewheel: true,
loopFillGroupWithBlank: false,
slidesPerView: 'auto',
touchReleaseOnEdges:true
});
productSwiper.swiper;
Version 5.3.1
let productSwiper = new Swiper(".swiper-container--product", {
direction: "vertical",
loop: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
grabCursor: true,
speed: 1000,
parallax: true,
autoplay: false,
effect: "slide",
centerMode: false,
mousewheelSensitivity: 1,
mousewheel: {
releaseOnEdges: true,
},
loopFillGroupWithBlank: false,
slidesPerView: 'auto',
Note: I removed the release on edges atribute on the 4.5.1 version, because currently it was causing that bug.
Sorry for the long post , thanks in advance!

Showing half of the prev and next images in owl carousel

I have implemented owl carousel in my application. I need to show half of prev and next images on the modal gallery of main image.
The modal gallery opens when you click on the main bigger image of the page. I tried to set stagePadding property, but it didnt work out.
Can I achieve the same without stagePadding property.
I have implemented thumbnails and other parts. You can view the implemented fuctionality here.
https://www.realtor.com/realestateandhomes-detail/6836-Xana-Way_Carlsbad_CA_92009_M29922-47778
galleryId.owlCarousel({
items: 1,
loop: true,
margin: 5,
startPosition: 1,
animateOut: 'fadeOut',
navSpeed: 100,
lazyLoad: true,
dots: false,
nav: true,
stagePadding: 100,
});
i had the same problem and my problem was solved with center:false.
$(".owl-carousel").owlCarousel({
center:false,
nav: true,
dots: false,
loop: true,
autoHeight: true,
autoWidth:false,
stagePadding: 10,
margin: 30
});

Get current image data Flexslider

Is it possible to extract data from the current Flexslider image, like image ID, URL and name? I need to print the current image URL outside the flexslider div.
The code I'm using now:
jQuery('#slider').flexslider({
animation: "fade",
animationSpeed: 0,
controlNav: false,
animationLoop: false,
smoothHeight: true,
slideshow: false,
keyboard: true,
touch: true,
directionNav: true
});
Many thanks in advance
You can use the after trigger which triggers after the slide changes:
jQuery('#slider').flexslider({
after: function { // Code that fetches the needed data goes here },
animation: "fade",
animationSpeed: 0,
controlNav: false,
animationLoop: false,
smoothHeight: true,
slideshow: false,
keyboard: true,
touch: true,
directionNav: true
});
A functioning demo is found here: Jsfiddle

Categories