title: WordPress path url in js script file
body: <p>I added custom script: </p>
  
  <pre><code>wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false);
  </code></pre>
  
  <p>It works great, except in the <code>functions.js</code> I have:</p>
  
  <pre><code>Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left";
  </code></pre>
  
  <p>This used to work before, until I changed to pretty permalinks and .htaccess</p>
  
  <p>The folder hierarchy is like:</p>
  
  <blockquote>
    <p><code>themename/js themename/images</code> (the images and js folder are in themename folder)</p>
  </blockquote>
  
  <p>I tried ../images - ./image - /images </p>
  
  <p>Normally it should go back 1 level wherever the js file is located....</p>
  
  <p>I don't want to use full path.</p>
  
  <p>Is there another way that WordPress can recognize in the javascript file to have the correct path?</p>
  
  <p>Currently I am just confused what I am doing wrong.</p>