Support

Account

Home Forums Front-end Issues How to wait until content is loaded before running JS? Reply To: How to wait until content is loaded before running JS?

  • I’m just pulling in content like images and text into the php page template. For example:

    <li class="slide"">
    										<img src="<?php the_sub_field('client_img'); ?>">
    										<div class="copy">
    											<p><?php the_sub_field('client_testimonial'); ?></p>
    											<div class="author">- <span class="name"><?php the_sub_field('client_name'); ?></span>, <span class="title"><?php the_sub_field('client_title'); ?></span>
    											</div>
    										</div>
    </li>

    That part is working fine. It’s just that at the time that my JS runs, it only sees the HTML and not the actual field values.