Okay
  Public Ticket #1921355
layerSlider is not a function
Closed

Comments

  • xialia started the conversation

    Hi,

    Longtime ago, I purchased the V5 for development and testing. That worked fine. Since then, our project, which is a web application, is near to its end and I'm considering again to have some funny things. So, I'm back to LayerSlider... and it's not working at all. Just got *** Uncaught TypeError: $(...).layerSlider is not a function ***

    Open the link, click on the icon named "ls-trial" and the click on the play button.

    https://2dy9mmumjoqztv0q.drumee.com/snapshot/#/dmz/Z-SyRkPjhZnQqKKeRxOjcqJ4OR-x0zSGAgBs3fv1p-A

    Regards

  •  110
    George replied

    Hello xialia,

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

    It seems like that the necessary js and css files of LayerSlider are not loading.

    Best Regards,
    George | Kreatura Dev Team

  • xialia replied

    Hi George

    Necessary js and css are loaded dynamically. 

    If you just open the link, you won't see LayerSlider.

    It will be only loaded after you click on the icon then play button.

    Wee don't want Layerslider to be loaded statically as it may not be used most of cases

    Please, have a look at this link. It's showing everything is loaded. 

    It seems there are conflicts with ADM or dynamic loading...

    https://factory.drumee.com/#!ls-caputue 

  •  110
    George replied

    Unfortunately I don't know what can cause this issue but maybe the timing... Maybe the slider init function is called before the .js files are properly loaded (?)

    Best Regards,
    George | Kreatura Dev Team

  • xialia replied

    I tried also static loading. It doesn't help.

    Do you know if there are some issues or conflicts with webpack ? or AMD ?

  •  110
    George replied

    I don't know how these works but some packers can cause issues like this, especially if it uses ECMAScript compatible compression.

    Best Regards,
    George | Kreatura Dev Team

  • [deleted] replied

    We are sorry to see that you left a 1-star rating for the product. Especially since you yourself confirmed it that LayerSlider was working properly in your web application. Furthermore, we did not change anything in the plugin that would affect dynamic loading. So obviously, the issue cannot be caused by LayerSlider. 

    We've investigated the problem further and found that the source of the issue is located in your own js code. There is a line that tries to load files (that are necessary for LayerSlider) after the slider was initialized, and this line generates the error that causes the issue. More specifically, the _this variable is not defined.

    We've attached a screenshot where you can confirm this.

    We kindly ask you to remove your 1-star rating, as the issue is clearly not generated in our plugin.

    Thank you.

  • [deleted] replied

    The screenshot:

  • [deleted] replied

    As we can see, you've managed to solve the dynamic loading in your web app. Now you have an entirely different error, which comes from an unnecessarily added tweenlite script.

    So we kindly ask you again, to remove or change your 1-star rating. Thank you.

  • xialia replied

    Hello

    The error you mentioned is not related to the issue underway. I can change rating to ten stars if that pleases you. It doesn't change the fact is that dynamic load is not working at all.

    We already have jquery and GreenSock libraries loaded. What I'm wandering is whether there is some specific changes in your jquery(1.10.0) and GreenSock (1.19.1) libraries that may conflict the ones we are already loading by default. 


  • xialia replied

    If you are seeing on other links, for example: https://2dy9mmumjoqztv0q.drumee.com/#/dmz/Z-SyRkPjhZnQqKKeRxOjcqJ4OR-x0zSGAgBs3fv1p-A it works. But this is not your product. It's https://www.npmjs.com/package/slider-pro. Less cool, but it takes a few minutes to integrate, because it supports ADM

  • [deleted] replied

    Dear Xialia,

    You keep saying that the error is caused by LayerSlider because it does not support dynamic loading. The slider on the demo page you linked ( https://2dy9mmumjoqztv0q.drumee.com ) fails with the following error: ** Uncaught TypeError: $(...).layerSlider is not a function **

    You interpreted this as an error in our plugin, so you left a 1-star rating. Then on Friday, we explained what exactly was the error and confirmed it with a screenshot. The mistake was in your code. And seemingly you solved it with our suggestions on the weekend.

    Then you got another error that was triggered by an extra tweenlite script being pulled into your site, that conflicted with our tweenmax (this is our greensock.js).

    We solved our GSAP usage with sandboxing in a way, where we support other tweenlite / tweenmax script usage on page in addition to ours. But for this to work, your own code (that pulls the tweenlite script) also has to support the sandboxing. Because two GSAP can only work together this way, where both support this method, not just one. So this error is still not generated by our plugin, but by your own code.

    Despite that you kept accusing us, but none of these errors were related to our plugin, we explained the problems and helped you identify them. So we do not believe that your rating would be fair towards us.