Okay
  Public Ticket #3109567
Issue with layerslider javascript file
Closed

Comments

  • Diana Burr started the conversation

    I had layerslider working on my local site. Last night I uploaded to a staging site and received an error in the console regarding the file layerslider.kreaturamedia.jquery.js

    Uncaught TypeError: Cannot read properties of undefined (reading 'split')

    Do you know why that happened and if there is a fix? Unfortunately, I don't have a url to share because I removed the layerslider and reverted to using owl carousel.

  •  45
    John replied

    Hi Diana,

    Thank you for getting in touch with us. My name is John, and I'm happy to assist you today. I appreciate your patience while we've been working towards your ticket.

    This shouldn't happen if everything worked properly before and the migration went smoothly. There must be something different on the new site that causes the issue.

    Unfortunately, the error message alone without context doesn't help us much. It would be a great help if you could set up a test page for us where we can see what's causing the issue.

    Best Regards,
    John | Kreatura Dev Team

  • Diana Burr replied

    The error is no longer. But I do have another question. I'm trying to pause the carousel when a navigation arrow is clicked. 

    I've tried following, but it doesn't work. Can you help? Website link is https://dickiesarena.wpengine.com/

    $('.ls-gui-element .ls-nav-prev').click(function() { 
                $('#featured-event-carousel').layerSlider('pause');
    });

    $('.ls-gui-element .ls-nav-next').click(function() {
                 $('#featured-event-carousel').layerSlider('pause');
     });


  • Diana Burr replied

    Well, I seem to have figured it out with this:

    $('#featured-event-carousel').on('slideChangeDidStart', function(event, slider) {
       $('#featured-event-carousel').layerSlider('stop');
    });


  •  45
    John replied

    I'm glad to hear that you managed to solve the issues. You can further simplify the API call with the code below. It doesn't have any significance, but it's shorter and a bit nicer.smile.png

    $('#featured-event-carousel').on('slideChangeDidStart', function(event, slider) {
        slider.api('stop');
    });

    Please let me know if there's anything else I can help you with.

    Best Regards,
    John | Kreatura Dev Team