(this).hide() then fade it in. The first function here fixes the issue
with fade in destroying cleartype text - but in IE you initially see
the ugly text and then when the fadeIn is done you get the cleartype
text. Before that nothing is hidden....
Any thoughts?
jQuery.fn.fadeIn = function(speed, callback) {
return this.animate({opacity: 'show'}, speed, function() {
if (jQuery.browser.msie)
this.style.removeAttribute('filter');
if (jQuery.isFunction(callback))
callback();
});
};
$(document).ready(function(){
var page_name = $(document).getUrlParam("page");
$("#loading").show("slow");
$('.inner').load('content.php?page='+ page_name, function(){
$("#loading").hide("slow");
$(this).hide();
$(this).fadeIn(4000);
});
$("div#content").corner("dog2 30px");
$('#off a').click(function() { //start function when any link
is clicked
if(!$(this).hasClass("current")) {
var _Href = $(this).attr('href');
$('#off a').removeClass("current");
$(this).addClass("current");
var content_show = $(this).attr("title");
$("#loading").show("slow");
$('.inner').load('content.php?page='+ content_show, function(){
$("#loading").hide("slow");
$(this).hide();
$(this).fadeIn(4000);
document.title = content_show;
}); // close click
}
return false;
});
});
No comments:
Post a Comment