Trouble with .live()
Trouble with .live()
I'm having trouble with the .live() function. Here's the code I'm working with:
- $(document).ready(pageLoaderInit);
function GetUrl(event){
if(this.href.indexOf(home)>=0&&this.href.indexOf('/wp-')<0){
event.preventDefault();
document.getElementById('blogcontent').innerHTML='<center><img src="'+loadingIMG.src+'" /></center>';
var contentclass = document.getElementById('blogcontent').className;
$("#blogcontent").load(this.href + ' .'+contentclass+''), function(data) {};
}
}
function pageLoaderInit(){
$("body a, div#blogcontent a").bind("click", GetUrl);
.......
- .......
}
Using .click() or .bind() works just fine, but as soon as I change it to use .live() the links start behaving normal. No AJAX call.
Here's the site I'm testing the code with.
http://ajaxpageloader.yi.org/
Any help will be appreciated. 
Ben.