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 Launch a Job Website Using WordPress [Complete Guide] - WPRiders Article
How to Launch a Job Website Using WordPress [Complete Guide]
We’ve All Been There… Even You I don’t know about you, but I was really excited about my first job. It was the end of my freshman year in college, and I wanted to find summer work. That’s why I started job hunting early. And if there’s one thing I learned, it’s that finding a […]
WordPress Stuck in Maintenance Mode? What To Do - WPRiders Article
WordPress Stuck in Maintenance Mode? What To Do
You know that heart-sinking moment when your WordPress site gets stuck in maintenance mode showing “Briefly unavailable for scheduled maintenance. Check back in a minute”? And then that minute feels like an eternity? It’s one of those universal WordPress experiences that can make anyone’s stomach drop. This frustrating maintenance mode is only supposed to last […]
Unlocking the Potential of WordPress Themes: A Discovery Journey
Choosing the perfect WordPress theme can seem like an overwhelming task. With thousands of options available, how do you find the ideal theme for your business website? The good news is, the process doesn’t have to be painfully tedious. You can discover amazing themes tailored to your brand and website needs with a strategic approach. […]