This should be fairly simple, but it’s just not loading for me. Here’s my html:
<div id="accordion">
</div>
That’s taken out of a WordPress page, if it matters. Here’s my jQuery, which is called in my header.php file. Here’s the jQuery I have, not sure it’s correct or not:
$('#accordion').load('/site/wp-content/themes/theme/acc.php');
I copied the information that used to be inside that div and stuck it in that external file. As I’m writing this, I’m going to check to make sure the path is correct, because it just hit me that that could easily be the problem.
Thanks guys/gals!
SOLVED :: Code was right, I was just calling the wrong .js file in my header!
you code looks correct. possible problems are:
you havn’t wrapped you code in a domready-event:
$(function(){ /* your code goes here */ });please check this, and if you find a problem you can’t solve on your own (a javascript-error you don’t understand, for example) please update your answer with the additional information.