0

I've got a page that currently has 3 divs and I'm using jshowoff to rotate the three divs currently at 30 seconds per div. My question is, is there a way of getting one div to display for a different amount of time than the other divs?

e.g. div 1 - 30 seconds, div 2 - 2 minutes, div 3 - 30 seconds?

Thanks

franglais
  • 928
  • 2
  • 15
  • 39

1 Answers1

1

You could try using setTimeout(). Here is a Jsfiddle:

http://jsfiddle.net/9Um94/2/

   $('#features').jshowoff({ speed:1500, links: false }); });

   setTimeout(function(){
     $("div.mydiv").fadeOut("slow", function () {
        $("div.mydiv").remove();
     });

   }, 2000);

You can se the time by changing 2000 to your preferred value, note this value is in milliseconds. So 2000 = 2seconds.

Also, take a look at this similar question that might help you: Show and hide divs at a specific time interval using jQuery

Community
  • 1
  • 1
Jeemusu
  • 10,415
  • 3
  • 42
  • 64
  • I think this is going to be the easiest road I go down! – franglais Aug 10 '12 at 10:56
  • I've then also combined it with http://www.brightcherry.co.uk/scribbles/jquery-auto-refresh-div-every-x-seconds/ to refresh the final div which is going to be on screen for half an hour but needs refreshing every few minutes – franglais Aug 10 '12 at 14:41