FlexSlider Not Display on Initial Page Load When Dynamically Generating Slides

2 replies · opened Jun 7, 2018

Sshasan8Jun 7, 2018

Hello Support,

I am implementing FlexSlider using the example code from the Featured News - Gallery section of http://themes.semicolonweb.com/html/canvas/demo-news.html. Because of the platform I am on, the slide elements must be dynamically generated by the client. I have working JavaScript code that properly places all of the dynamic class="slide" elements within the static class="slider-wrap" element.

The problem is when first loading the page the slider and gallery are not displayed. A forced refresh of the page does display everything perfectly. Upon inspection of the page when the slides are not displayed their display and z-index properties are not being updated. I suspect on initial page load the dynamic slides are generated after the Canvas fslider function is applied to the page, therefore not seeing any slides to display.

Should I be doing something different when generating the slides or a way to execute the Canvas function once all the slides are generated? Is the demonstration code still valid, even though it works for static slides?

Any assistance is appreciated.

SSemicolon WebSTAFFJun 19, 2018

Hello,

Simply recall the following JS Function once the Page is Dynamically Loaded:

SEMICOLON.widget.loadFlexSlider();

This should definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Sshasan8Jun 20, 2018

Thanks!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard