I am using some javascript in the $(document).ready function to decide which content gets shown. My problem is that this never gets executed when i load this page into a div on another page. The below has been stripped of some other things i am doing, FYI. This is in the page with the content:
$(document).ready(function(){ if(notvalidated){ var thisContent = 'You are not authorized'; $("body").empty(); $("body").append(thisContent); } }); And this is in the page where i would load the content: $(document).ready(function(){ $("#clickMe").click( function(){ $('#contentDiv').fadeOut(1200,function() { $('#contentDiv').load('content.html').fadeIn(1200); }); return false; }); }); When i just visit the content page, i get "You are not authorized". But when i load the content into the div, i get the full content, which leads me to believe that the document.ready function is not running at the time the content is pulled. Does anyone have any pointers? Am I missing something? Regards, -jesse-