Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
145
rated 0 times [  147] [ 2]  / answers: 1 / hits: 40277  / 10 Years ago, wed, march 19, 2014, 12:00:00

First, I am new in javascript and I got a problem in 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 guide me ....


More From » jquery

 Answers
48

This is wrong: setTimeOut



Right word: setTimeout



(Change the O to lower case o)


[#71912] Monday, March 17, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josefn

Total Points: 251
Total Questions: 93
Total Answers: 84

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;