My idea is to fade in to the tab that is loaded.
This code seems like it should work, but it doesn't fade in. What is wrong?
$(document).ready(function() {
$("#logo").click(function(event) {
$("#central").fadeIn("slow").load('page.html');
});
});开发者_如何学C
You have to hide #central first, before fading it in:
$('#central').hide().fadeIn('slow').load('page.html');
Jacob's answer is right, of course, but I'd hazard a guess that you probably want to load the html and then fade it in?
$(document).ready(function() {
$("#logo").click(function(event) {
$("#central").load('page.html', function() {
$(this).fadeIn("slow");
});
});
});
精彩评论