javascript - jQuery auto load a div after a 5sec -


i have 4 div bars in home page. i'm loading div bars on click. want load the 1st div when page loading, 2nd div should load after 5 seconds. after 5 sec 3rd div should load wise. code : -

$(document).ready(function () {       $('#click1').click(function () {         $('#desc1').toggle(400);         $('#desc2').hide();         $('#desc3').hide();         $('#desc4').hide();         $('#desc5').hide();      }); }); 

thnx,

var delay=5000;      $(document).ready(function () {             $('#desc1').toggle(function(){                 $('#desc2').toggle(delay,function(){                     $('#desc3').toggle(delay,function(){                         $('#desc4').toggle(delay,function(){                             $('#desc5').toggle(delay,function(){                             });                         });                     });                 });             });         });     

try this


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -