The page in question is http://matthewanderson.cc
I'm a javascript newbie working on a WordPress-based portfolio site. I'm using jQuery .load() to fetch content from WordPress posts, and it works in Firefox, Safari and Chrome, but not any of the IEs.
The specific Ajax code is here:
$(document).ready(function(){
$("a.ajax-load").click(function (event) {
//prevent standard browser link behavior
event.preventDefault();
//Fade out any existing visible content
$("#project-expanded *:visible").fadeOut("slow");
//Insert loading graphic
$("#project-expanded").html('<p style="text-align:center;"><img src="http://matthewanderson.cc/wp-content/themes/tiles/ajax-loader.gif" width="16" height="16" style="margin:160px 0 0"/></p>');
//Pull URL from clicked object, store it in a variable, add string " #ajax-content" to be used in next line
var postAjaxURL = $(this).attr("href") + ' #ajax-content';
//Fetch content from the URL contained in postAjaxURL (filtering for #ajax-content), insert results into #project-expanded
$("#project-expanded").load( postAjaxURL, function(){
//Set CSS contents of #project-expanded to display:none so they can be faded in later
$("#project-expanded *").css("display","none");
//Expand #project-expanded using jQuery .show effect
$("#project-expanded").show("slow", function(){
//After #project-expanded is expanded, fade in the contents
$("#project-expanded *").fadeIn("slow");
});
});
});
I've added the following headers to all the pages being fetched to prevent IE caching, but it doesn't seem to help
<?
//Set no caching
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
Anybody have any thoughts?
UPDATE:
It's probably prudent to mention that none of the versions of IE are reporting any javascript errors.
Also, I don't think it's a caching issue. After watching the page requests being made with Fiddler, I can see that content from outside the page is being successfully called.