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 start callback 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

Check some other articles we wrote

Customizing Your WordPress Site: Tailoring Your Brand Identity
Building a distinctive brand identity is crucial for any business wanting to stand out these days. Consumers are becoming more discerning and educated, seeking brands with compatible values and the ability to deliver real value. Fortunately, customizing your WordPress website is one of the best ways to establish and reinforce your brand identity online.  We […]
How To Test If Customers Will Pay For The Product You’re Building
You’ve had this business idea for a while now. You’ve even held debates with yourself on whether it’s worth the risk. Not to mention that you’ve been looking for ages to find practical and secure ways to test your ideas. But you still don’t know what the next step is. I know the feeling, I’ve […]
Top 5 Best WordPress Themes
I’m not sure about you, but the quarantine has made me want to try some new things, and baking is one of them. And to my surprise, I quickly realized that WordPress themes are like baking a cake. Now, this might sound crazy, but just hear me out. Let’s say you’re bored and you scroll […]