RPeraltaJr
9/27/2017 - 1:58 PM

WordPress Path Url in JS Script File

Set up a 'templateUrl' that can be accessed within javascript file

  <script type="text/javascript">
    var templateUrl = '<?php echo get_bloginfo("template_url"); ?>';
  </script> 
  
  <!-- Other scripts -->
  
  </body>
</html>