Support

Account

Home Forums General Issues Show element if field is empty using javascript Reply To: Show element if field is empty using javascript

  • 
    <script>
      <?php 
        if (get_field('video_id')) {
          ?>
            // JS to run if there is a value
          <?php 
         } else {
          ?>
            // JS to run if there no value
          <?php 
        }
      ?>
    </script>