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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.