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

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 […]
WordPress cron save post with unfiltered html content
WordPress cron save post with unfiltered html content
This applies for method “wp_insert_post” used inside a WordPress Cron. By default WordPress checks if the user has the capability to save unfiltered HTML content if ( ! current_user_can( ‘unfiltered_html’ ) ) { which WP CRON doesn’t have.
Categorize WordPress Comments in Genesis Framework
TL;DR: If you want to download the FREE comments categories plugin for your own use, click here  We have created a new version from scratch that is publicly available as a contribution to the WordPress community. Have you ever needed to categorize comments added to your site? WordPress, our favorite Content Management System (CMS) allows […]