Jump to content

time delay within a function


M.O.S. Studios

Recommended Posts

here is my function

 

function runAccordion(){
var e=document.getElementsByName('overflow_remove');
	for(var i=0; i<e.length; i++){
	e[i].style.overflow="hidden";
	}

  var nID = "Accordion_" + document.getElementById('season_select').options[document.getElementById('season_select').selectedIndex].value;
  if(openAccordion == nID)
    nID = '';
    
  setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" 
      + openAccordion + "','" + nID + "')", 33);
  
  openAccordion = nID;

for(var i=0; i<e.length; i++){
e[i].style.overflow="auto";
}



}
</script>

 

Basically  i want a time delay added before that last 'for()' loop how would i do that?

Link to comment
https://forums.phpfreaks.com/topic/205177-time-delay-within-a-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.