SetTimeOut not showing ReferenceError: setTimeOut not defined

Firstly, I am new to javascript and I am having a problem with setTimeOut ...

This is my script code ........

$('#nav ul li a').hover(function(){ $(this).next("div").slideDown("fast").siblings("div").slideUp("slow"); console.log("hover"); }, function(){ setTimeOut( function(){ if(!$(this).next('div').is(':hover')){ $(this).next('div').slideUp('slow'); }} ,1000) }); 

This is my HTML code .....

  </div> <!-- end of first-row --> <ul> <li> <a href="#">Home </a><div class="menu_box box1"></div> </li> <li> <a href="#">Place</a><div class="menu_box box2"></div> <!-- end of menu --> </li> <li> <a href="#">Guide</a><div class="menu_box box3"></div> </li> <li> <a href="#">Contact</a> </li> <li> <a href="#">About Us</a> </li> </ul> </div> <!-- end of nav --> 

Please notify me ....

+6
source share
2 answers

This is not true: setTimeOut

Correct word: setTimeOut

(Change O to lowercase o)

+24
source

Change setTimeOut to setTimeout :

 //... setTimeout( function(){ if(!$(this).next('div').is(':hover')){ $(this).next('div').slideUp('slow'); }} ,1000); //... 
+3
source

All Articles