So I have a WordPress theme Laid Out like this:
wp-content/themes/themename/
and I'm loading javascript that exists in:
wp-content/themes/themename/library/js/script.js
my issue is I have a call in script.js that does this:
$("#message").load('text.html');
With text.html also in the js folder mentioned above, but text.html is not being loaded.
script.js is included by head.php in the wp-content/themes/themename/ folder. I tried placing the file there, and it doesn't work.
The onlything that seems to work is if the put the url http://www.domain.com/wp-content/themes/themename/text.html in load as follows:
$("#message").load('http://www.domain.com/wp-content/themes/themename/text.html')
Is it possible to load() the file with a path and not a full domain? The jQuery doc indicates that it is, however I just can't get it to work.