Hi all,
I am using a great tutorial from lynda.com that describes how to use ajax to create a preloaded and to load a portion of a div from one page to another page. The funny thing is the demo/exercise works but what I transposed and reworked for my kind or worked while I was working it out, but now doesn't work at all. Could it be my Mamp environment? What's weird is the slider and other Jquery elements work fine...
// remap jQuery to $
(function($){})(window.jQuery);
/* trigger when page is ready */
$(document).ready(function (){
initialize();
});
function initialize() {
//Click on nav to load external content through AJAX
$('#menu_container a').click(function(e){
e.preventDefault();
$('<div></div>').attr('id', 'animatedStars').appendTo('#content'); //spinner
$('#content').load( e.target.href + ' #loadContent', function() { //stop spinner
}); //pages finished loading
}); //clicked on nav
----------------------- //add fadespinner function
//fade spinner graphic
function fadespinner() {
$('#animatedStars').fadeOut('slow', function() { //stop spinner
$(this).remove();
}); //remove spinner
}