Due to IE's inability to fade transparent PNG's I have decided to change my fucntion to simply show PNG's if the user is using IE but to fade them if they are using any other browser. The function below works fine in IE and does what i expect it to but in any other browser i.e. Firefox, Safari it doesnt do anything, am i missing something or do I have a syntax error?
$('#content2 a').click(function(){
if($.browser.msie){
var toLoad = $(this).attr('href')+' #content';
$('#content').show(loadContent);
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
function loadContent() {
$('#content').load(toLoad,'',showNewContent())
}
function showNewContent() {
$('#content').show();
}
return false;
}else{
var toLoad = $(this).attr('href')+' #content';
$('#content').fadeOut('slow',loadContent);
$('#load').remove();
$('#wrapper').append('<span id="load">LOADING...</span>');
$('#load').fadeIn('slow');
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
function loadContent() {
$('#content').load(toLoad,'',showNewContent())
}
function showNewContent() {
$('#content').fadeIn('slow',hideLoader());
}
function hideLoader() {
$('#load').fadeOut('slow');
}
return false;
};
});