Schedule a Free Consultation
Test If Flexslider Loaded

Test If Flexslider Loaded

Read Article

Recently I had a mini project for a client and I had to test if Flexslider has been shown on the screen in order to further modify it. Subscribing to the startcallback didn’t work because the slider was shown by the theme and not by my code.

jQuery(document).ready(…) didn’t work either. The slider was there, but I couldn’t subscribe to click events on the arrows of the slider.

So I decided to go for a chained setTimeout sequence. I used it for Flexslider, but it can be used whenever you need to check that some things happened on the page and you really don’t have other (easy) alternatives.

Here’s how it looks like and it works:

Later edit:
Another approach would have been to use setInterval / clearInterval JavaScript functions. Next time.

Navigate to

You Might Also Enjoy These Digital Marketing Articles:

How to Choose a WordPress Design Agency - WPRiders Article
How to Choose a WordPress Design Agency
Choosing the right WordPress design agency is crucial when creating a website that will be your business forefront. A good website should bring visitors and help convert these visitors into customers for your business. With design agencies for WordPress, many options are available, but this doesn’t mean all are good for you. So deciding which […]
How to Choose the Best WordPress Consultant for Your Business - WPRiders Article
How to Choose the Best WordPress Consultant for Your Business
WordPress is one of the most straightforward platforms you can use to start a website. You install it, configure it, add the required plugins and themes, and write the content. After that, you’re pretty much good to go. However, if you’re looking to elevate your website or need expert guidance,choosing the best WordPress consultantcan make […]
Webflow vs. WordPress for SaaS Funnels: Which Is Better? - WPRiders Article
Webflow vs. WordPress for SaaS Funnels: Which Is Better? (Data-Based Research 2024)
The go-to resource for WordPress insights & tips
and where WordPress experts share their knowledge.