wordpress path url in js script file
- by Cam
I added custom script
wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false);
works great, except
in the functions.js i have
Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left";
now this used to work before, until changed to pretty permalinks and .htaccess
the folder hierarchy is like:
themename/js themename/images (the images and js folder are in themename folder)
i tried ../images - ./image - /images
normally it should go back 1 level where-ever the js file is located....
i dont want to use full path
is there a other way that wordpress can recognize in the javascript file to have the correct path?
currently i am just confused what i am doing wrong