So I'm using a custom Genesis child theme. I've created my own PHP file called showcase.php and placed it in my custom child theme directory.
This file is located at: /public_html/wp-content/themes/mycustomtheme/showcase.php
This file is included via a hook:
PHP Code:
add_action('genesis_after_header', 'child_make_showcase');
function child_make_showcase()
{
require_once(STYLESHEETPATH.'/showcase.php');
}
Within showcase.php, I am changing the background of an element using Javascript when the user clicks on a certain area of the page:
Code:
document.getElementById("ED-quicksearch").style.backgroundImage = 'url("/wp-content/themes/mycustomtheme/images/quicksearch-bg-tucson.png")';
That's just part of the Javascript of course. I swear the above code worked before but now it doesnt. I can't seem to figure out what path to give it. If I give it an absolute URL it works, so the image does exist in the proper place and the element ID is correct, I just can't figure out what relative path to use. And it boggles my mind that I am certain it USED to work with that relative path above. Neither Firefox Error Console or Firebug show javascript errors.