wordpress path url in js script file
Posted
by
Cam
on Stack Overflow
See other posts from Stack Overflow
or by Cam
Published on 2011-03-07T15:40:30Z
Indexed on
2011/03/07
16:10 UTC
Read the original article
Hit count: 204
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
© Stack Overflow or respective owner