load() working by class, but not id.
I am trying to load content using the load page fragment feature from a div in another page and insert into the current page of the same id.
Frankly, I'm quite stumped. :P
Examples:
This is what works:
$("#content").load(''+url+' .right'), function(data) {};
This is what I need to work.
$("#content").load(''+url+' #content'), function(data) {};
Using the second example ends up loading nothing.
Here is the function.
- function loadPage(url){
if(!isWorking){
scroll(0,0);
document.getElementById('blogcontent').innerHTML='<center><img src="'+loadingIMG.src+'" /></center>';
$("#blogcontent").load(url + ' .right'), function(data) {};
}
}
What this does is it replaces the content of "blogcontent" with a loading animation.
Then, using .load() it calls the requested url and inserts the part from ".right" into "blogcontent".
Rather than obtaining the fragment by using it's class name "right", I want to obtain the fragment by it's ID name "blogcontent".
Site:
http://ajaxpageloader.yi.org
Any help would be greatly appreciated. :D
Ben.