Before anyone says this should be on the Wordpress Stackexchange, please read through as this is a JS query and not a Wordpress query. I am trying to get a path to the Wordpress theme in to a JS file so I don't have to include the full path, would usually use <?php bloginfo('template_url'); ?>
in the template files but obviously we are working in a JS file here.
I have found a forum post that says to use the following before the JS file is called for:
<script type="text/javascript"><!--
var template_url = "<?php bloginfo('template_url'); ?>";
// -->
</script>
and then in the JS file put template_url
but this just puts 'template_url' in the middle of the path.
The line this is to go in is:
$(this).prev().css({ backgroundImage : 'url(template_url/images/icons/menu-divider.png)' });
How can I please get the full path to be called in this line of JS?
Many thanks Adrian