I think I changed something, and now it’s not working. I have tried everything. Commenting out everything, but it’s late so I am probably making stupid mistakes. Here it is:
// Show All Work on Load
function showAllWorkOnLoad() {
var thePostData = "filter=allwork";
var inner = document.getElementById('content').innerHTML;
alert(inner);
$.ajax({
type: "POST",
url: "http://justtwobros.com/get_work.php",
data: thePostData,
success: function(theRetrievedData) {
document.getElementById('content').innerHTML = theRetrievedData;
$("#content").fadeIn(20);
focusButtonAllWork();
var count = 0;
$("#content").find('.work_thumbnail_wrapper').each(function() {
count++;
var timeWait = (count * 100) + 500;
var theId = $(this).attr('id');
var theIdDone = "#" + theId;
setTimeout(function(){$(theIdDone).fadeIn(300);},timeWait);
});
}
});
}
If you want a link, here it is: http://justtwobros.com
Nothing is showing up in the side (it calls this javascript function to get results from a php file, then put it in, then fade in the sections. I know it’s messing up here because I just put text in the PHP file and it still didn’t work.
Thanks!
The only other issue I see is that you are loading both jQuery and Prototype.
Prototype uses a $ object just as jQuery does. Since you are loading Prototype second, it’s definition of the $ object is overwriting jQuery’s, resulting in an error along the lines of “.ajax() not defined for object $”.
Remove Prototype.js and it should work.