Okay
  Public Ticket #1692924
Add Class to LS-Wrapper
Closed

Comments

  • jmessenger919 started the conversation

    Hello,

    What jQuery script can I use to add a class to the wrapping div (LS-WRAPPER) of a layer? 

    Specifically, I'd want to check if LS-LAYER has a class, and then apply a class to its parent.

    I've tried many variations of this: https://stackoverflow.com/questions/4208051/if-hasclass-then-addclass-to-parent but nothing seems to work at all. It renders the code, but does not fire and add the appropriate classes. I have also checked the Console for errors, and made sure to switch $ for jQuery since it's being run in no-conflict mode.

    Solving this for me would make your plugin infinitely more accessible.

    Thanks,

    Jesse

  • [deleted] replied

    Hello Jesse,

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

    Without seeing your code, it's hard to say anything, but you should use the sliderDidLoad event (https://layerslider.kreaturamedia.com/documentation/#layerslider-api) for this purpose, because if you run your code before the initialization, not every aspect of the slider is accesible yet. But if you show us your code, we can tell more.