Home Forums WoodMart support forum Slider bug when loaded with ajax

Slider bug when loaded with ajax

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #320001

    Hello, i have a ‘recently viewed products’ slider which uses the cross-sells slider template and is loaded via ajax call (to automatically refresh). On mobile it works fine, but on desktop the slider doesn’t work, despite still loading all the product elements in the slider. It shows only the first x products and doesn’t let me navigate through it. I noticed in the source code that the divs with class ‘owl-stage-outer’ ‘owl-nav’ and ‘owl-dots’ aren’t loaded, but the cross-sells slider which uses the same template loads them. It works fine on mobile because i think it doesn’t need those divs, but i can’t figure out why they are not loaded on desktop.

    Attachments:
    You must be logged in to view attached files.
    #320009

    Artem Temos
    Keymaster

    Hello,

    Try to modify your custom JS and put the following line of code after adding the slider HTML to the page https://gyazo.com/2fd19ede9168d9af8191afb556c0d9b6

    woodmartThemeModule.owlCarouselInit();

    Kind Regards

    #320328

    it worked! Thank you

    #320329

    Artem Temos
    Keymaster

    Great, you are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Slider bug when loaded with ajax’ is closed to new replies.