Mam taki kwalek kodu jquery :
$('a[href="aktualnosci.php"]').click(function(){ $('#foto').load('gallery.php', {'dir':"glowna", 'kategory':"glowna", 'gallery':'no'}, function() { //$(this).hide().fadeIn(100); }); //$('#content_bottom').hide().css("bottom", "0px"); $("#content_bottom").hide().removeClass("move_top"); $('#content_bottom').load('aktualnosci.php', {'kategory':$('a[href="aktualnosci.php"]').attr('title')}, function() { $content_height = $("#content_bottom").height(); $(this).hide().animate({"height": "show", "opacity": "toggle"}, { duration: "slow" });//.fadeIn('slow'); $steps = ($content_height/$div_frame) + 1; $(this).zero(); }); return false; });
Głównie chodzi o druga czesc po pierwszej funkcji load, jak widac element #content_bottom po kliknieciu chowa znika - hide() - a nastepnie wysuwa sie animate({"heighet":"show" .....
Ale chce zeby ledniej wszystko wygladalo na stronie i chce zeby zamiast znikac element chowal sie a nastepnie wysuwal wiec zrobilem tak :
$("#content_bottom").animate({"height": "hide", "opacity": "toggle"}, { duration: "slow" },function(){ $("#content_bottom").removeClass("move_top"); $('#content_bottom').load('aktualnosci.php', {'kategory':$('a[href="aktualnosci.php"]').attr('title')}, function() { $content_height = $("#content_bottom").height(); $(this).hide().animate({"height": "show", "opacity": "toggle"}, { duration: "slow" });//.fadeIn('slow'); $steps = ($content_height/$div_frame) + 1; $(this).zero(); }); }); return false;
Czyli jako callback animate hide dalem load i animate show, no ale niestety, po showaniu sie element #content_bottom juz sie nie wysuwa.....