AJAX

AJAX

I have my site set up so that when a user clicks an item on the page navigation bar, it uses the load() function to load new content onto the page. I'm only trying to load the content from an HTML document named 'pages.html' which resides in my domain, but it never works. The code for loading content is in the index.html page, and I can load content from that page, but not from other pages on my site. The code looks something like this:

$(document).ready(function(){
$('#content').load('pages.html #home'); //show Home page
$('.menu a').click(function(){ //start ajax function
var url = $(this).attr('href'); //url =  clicked navigation button
$('#content').html(''); //clear content box
$('#content').load('pages.html #' + url); //load new content into #content box


Thanks!