Thanks a lot for your input. It worked.
The problem was with the jQuery library. I noobishly mistyped the filename in the script's src.
Anyway, I face something different now. I'm not sure whether it has anything to do anymore with PHP, but since this topic is still open I'll give it a shot..
I tried adding a fade-out/fade-in effect when the content inside the #max_wrap div changes (when I click the links), but nothing really worked as expected.
Some codes did the fade-out correctly, but not the fade-in. Some did both well, but during the transition the content below the #max_wrap div moved up (and down afterwards).
This is what I used so far:
$(document).ready(function(){
$("#c1").click(function(){
$("#max_wrap").fadeOut('slow').load("maintext.php").fadeIn("slow");
}); });
- This one loaded the php file (too fast), faded out, and faded in again.
$(document).ready(function(){
$("#c1").click(function(){
$("#max_wrap").fadeOut('slow', function(){
$("#max_wrap").load("servprest.php", function(){
$("#max_wrap").fadeIn('slow');
});
});
});
});
- Fade-out and in worked well with this one, but caused the succeeding divs/elements to move up for a bit. Modifying it a bit, I came up with a version that doesn't cause the succeeding elements to move up. Also, it correctly executes the fade-out, but not the fade-in.
Any suggestions?