Jumping occurs in Slick Carousel when adjusting the width of the active slide

Check out the fiddle link here: http://jsfiddle.net/br24p3Lr/

I've been attempting to perfect the animation when transitioning to a new active slide. Despite trying various approaches to resolve this issue, I seem to be stuck at the moment.

The following is the HTML code snippet:

<section class="ringenslider-wrapper">
    <div class="container">

        <div class="row">

            <div class="col-xs-12">
                <h2><?php _e('Popular models'); ?></h2>
            </div>

        </div>

    </div>  

    <ul class="ringenslider">

        <li class="product-slide">

            <div class="product-slide-wrap">

                <div class="product-image">

                    <img src="https://i.imgur.com/hyEkF58.png" alt="" />                
                </div>

                <div class="product-info">
                    <h3>Steinberg Ring 1</h3>
                    <div class="prijs">
                        €499
                    </div>
                    <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.
                    </p>

                    <div class="button-slider-wrap">
                        <a class="button-slider" href="#">
                            Nu bestellen
                        </a>
                    </div>

                </div>

            </div>

        </li>

        (additional product-slide items listed here)

    </ul>


</section>

This is the corresponding JavaScript section:

(function ($) {

    "use strict";


    $(document).ready(function() {

  //Ringenslider
         $('.ringenslider').slick({
            infinite: false,
            slidesToShow: 1,
            draggable: false,
            centerMode:false,
            swipe: false,
            dots:false,
            fade:false,
            speed:745,
            cssEase: 'ease',
            useTransform: true,
            nextArrow: '<a class="slide-next">Volgende <i class="fa fa-angle-right" aria-hidden="true"></i></a>',
            prevArrow: '<a class="slide-prev"><i class="fa fa-angle-left" aria-hidden="true"></i> Vorige</a>',
            variableWidth: true,
            responsive: [{
                        breakpoint: 1200
                        , settings: {
                            slidesToShow: 3
                        }
                    }, {
                        breakpoint: 992
                        , settings: {
                            slidesToShow: 2
                        }
                    }, {
                        breakpoint: 768
                        , settings: {
                            speed: 250
                            ,arrows: !1
                            ,swipe: !0
                            ,centerMode: !0
                            ,slidesToShow: 1
                        }
                    }]

        });
    });
}(jQuery));

And lastly, here is the CSS styles section:

    /* Styling for Ringenslider Wrapper */
.ringenslider-wrapper {
    position:relative;
    float:left;
    width:100%;
    padding:0 0 80px 0;
}

(additional CSS rules listed here)

I've experimented with several solutions, but the animation remains glitchy and inconsistent.

Your assistance in resolving this matter would be greatly appreciated.

Regards, Dylan Smit

Answer №1

Indeed, I encountered a similar issue with a website I developed for a client in the past. Despite trying several different sliders, the same problem persisted across all of them. It seems that JavaScript and jQuery (if utilized) do not handle slide changes effectively, leading to glitches, jumping, and other issues. I was able to find a solution by using velocity.js in combination with fireslider. However, creating your own slider with velocity or finding another one could also be effective.

Velocity serves as an engine for quick animations and is compatible with JavaScript and optional jQuery. If you opt for fireslider, then jQuery is necessary.

I trust this information will prove useful to you.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

jQuery Ajax allows scripts to be contained within a page, even if the page itself is empty

Utilizing jQuery ajax to display an HTML page that includes javascript functions, here is my code: function ChartBook() { $.ajax({ url: '/Charts/ChartBook', dataType: 'html', id: 1, ...

Modal overlays should consistently appear behind the loading animation

When processing something and using overlays for loading, everything works fine until I use it for a modal. The issue arises when the overlays appear behind the modal instead of in front. Is there a way to bring the overlays to the front of the modal? Bel ...

Upon clicking, the reset function will be triggered

I have a jQuery code that includes a click event on td elements. After clicking on a td, an input field with text appears and the focus is set at the end of the text. However, I want to remove the focus after the initial click so that I can click in the ...

Set the text field to be editable or readonly based on certain conditions

Is there a way to conditionally enable or disable an editable field (edit/read only)? I have tried using session role from the database to set conditions on the text field, but I am unsure of how to proceed... <?php include('session.php'); ?& ...

Fluidity of Containers on Mobile Devices

I currently have a list structured like this: https://i.sstatic.net/ei4Xt.png In order to display more details about each list item, I've added a hidden div that can be toggled open like so: https://i.sstatic.net/61k5Z.png While this works fine on ...

Difficulty encountered when attempting to utilize keyup functionality on input-groups that are added dynamically

I've exhausted all available questions on this topic and attempted every solution, but my keyup function remains unresponsive. $(document).ready(function() { $(document).on('keyup', '.pollOption', function() { var empty = ...

Customize the border style for the span element

I attempted to use the code below in JavaScript/jQuery to adjust the border thickness. Unfortunately, it seems to be ineffective. Can someone please assist me? //$("span").css({"border":"4px solid green"}); document.getElementById("192.168.42.151:8984_ ...

Encountered a problem with sending values using jQuery and JSON: Unexpected token 'b'

Can you explain why in this specific scenario there is an error showing up as SyntaxError: Unexpected token b listados:229? response = '{"name":"John"}'; var obj = jQuery.parseJSON(response); $.ajax({ url:urlform, dataType: ...

Delete all HTML functionalities

Is there a way to strip HTML functions when using a text area so that the content shows as plain text in a new post (div)? For example, if I type "Hello", I want it to appear as "< b > Hello < b / >", showing the whole code. Here is the code ...

"Position the input file with Bootstrap's input text for a seamless alignment

After experimenting with the design of my input file using this code snippet, I am facing difficulties aligning the button within the text input of a bootstrap element. Below is the code I have used to style my input field, but unfortunately, the bootstra ...

I crafted this dropdown menu, but for some reason, the selections aren't registering when clicked. Below is the code I used. Any assistance would be greatly appreciated!

Hi there, I need some help with getting my code to run properly. I've created a dropdown box using HTML and CSS, but it seems like there's an issue with the JavaScript portion as the options are not being selected. I've included a code snipp ...

Embed a YouTube video within the product image gallery

Having trouble incorporating a YouTube video into my Product Image Gallery. Currently, the main product photo is a large image with thumbnails that change it. You can see an example on my website here. Whenever I attempt to add a video using the code below ...

Cross-Browser Compatibility of CSS

I have noticed that lists styled with the following CSS code appear differently in Internet Explorer 8 and Firefox 4. In IE8, the rounded corners are missing, while FF4 does not change color when hovering over it. Which browser should I trust for accurate ...

Can you explain the distinction between using .hover and :hover?

Recently, I came across some CSS code that was written by someone else and it contained the following: li.hover, li:hover { } This made me curious - is there a distinction between .hover and :hover in CSS? Could it be possible that certain browsers inte ...

Tips for organizing nested form rows with Bootstrap 4

I am currently working on a nested form row and I am looking to align the form fields vertically. The current output I am getting is shown below: https://i.sstatic.net/NEWGY.png Here is the code snippet: <link rel="stylesheet" href="https://maxcdn ...

Resetting Radio Buttons for Re-Selection

I've been puzzling over this issue for some time now and have tried various methods with no luck. I'm working on a Quiz that uses radio buttons hidden from view, where they are supposed to be checked by clicking the li element they are in. Altho ...

Border with curved edges

Having an issue with content boundaries while using CSS rounded corners in Firefox. Here is the code snippet: Code <html> <head> <style> #outter { width: 200px; margin: auto; text-align: cent ...

Using relative paths to showcase images in Node.js

I am currently working on my first Node.js MVC app where I am using native Node and not utilizing Express. One issue I am facing is the difficulty in displaying images from my HTML files through their relative paths. Instead of sharing my server.js and ro ...

Can CSS Grid be substituted for Material UI's grid component?

Exploring the Material-UI Grid Component, I have found that it is built on flexbox and offers great functionality. However, my curiosity lies in comparing it to CSS Grid, which I find equally user-friendly. Despite my preference for CSS Grid, I am hesita ...

Creating a visual representation on a canvas using JQuery

$.fn.colorPicker = function () { const $div = this; const $colorPickerIcon = $("<img></img"); const $canvas = $("<canvas></canvas>").addClass("canvas"); const $context = $canvas.getContext("2d"); const $closeButton ...