*jancis38* Posted June 16, 2010 Report Share Posted June 16, 2010 (edited) Kādām jaizskatās jQuery skripta rindiņām, lai refrešotu noteiktu div'u ik pēc, piemēram, 30 sekundēm (būtu jauki ar fadeIn un fadeOut effektiem)? EDIT: Es pats varu tikai tik tālu tikt: <script> setInterval(function() { $("#sidebar_left").fadeOut("slow").fadeIn("slow"); }, 10000); </script> Edited June 16, 2010 by *jancis38* Link to comment Share on other sites More sharing options...
SCORPIONS Posted June 16, 2010 Report Share Posted June 16, 2010 Varētu kaut kā šādi: setTimeout("$('#sidebar_left').fadeOut('slow')", 10*1000); setTimeout("$('#sidebar_left').load('latest_topic.php').fadeIn('slow')", 10*1000); Link to comment Share on other sites More sharing options...
X ID Posted June 16, 2010 Report Share Posted June 16, 2010 (edited) callbackus jāizmanto, lai viss notiktu smuki pēc kārtas... <script type="text/javascript"> var timeout = 30000; var reload = function(){ $("#sidebar_left").fadeOut("slow", function(){ $(this).load("mans/super/links.php", function(){ $(this).fadeIn("slow", function(){ setTimeout(reload, timeout); }); }); }) } $(function(){ setTimeout(reload, timeout); }); </script> Edited June 16, 2010 by X ID Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now