I need to include the path to my theme file within a javascript file. How would I go about this? I have already tried:
var templateUrl = "<?php get_stylesheet_directory_uri(); ?>";
function LightboxOptions() {
this.fileLoadingImage = "'"+templateUrl+"/img/loading.gif'";
this.fileCloseImage = "'"+templateUrl+"/img/close.png'";
this.resizeDuration = 700;
this.fadeDuration = 500;
this.labelImage = "Image";
this.labelOf = "of";
}
This does not give me the path, but just inserts <?php get_stylesheet_directory_uri(); ?>
instead of the actual path. Any ideas? Thanks in advance!