Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Adding a timer on mouseover effect.
Old 10-31-2007, 10:21 AM Adding a timer on mouseover effect.
vkw91's Avatar
Ultra Talker

Latest Blog Post:
Good Web Design Guide - part 1
Posts: 314
Name: Vicky
Location: Wales
Trades: 0
Hi guys, Does anyone have any idea on the best way to add a timer on this mouseover?

Code:
<script language="Javascript">
function toggleDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}
</script>
Code:
<a href="#" onMouseOver="toggleDiv('hover',1)" onMouseOut="toggleDiv('hover',1)">
Thanks in advance!
__________________
Blog (new):
Please login or register to view this content. Registration is FREE

Portfolio:
Please login or register to view this content. Registration is FREE

Techno Pup:
Please login or register to view this content. Registration is FREE

vkw91 is offline
Reply With Quote
View Public Profile Visit vkw91's homepage!
 
 
Register now for full access!
Old 10-31-2007, 11:08 AM Re: Adding a timer on mouseover effect.
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
onmouseover="setTimeout('toggleDiv(\'hover\', 1)',1000)"

1000 represents the time in milliseconds (in this case, exactly 1 second.) Adjust as needed.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-31-2007, 11:45 AM Re: Adding a timer on mouseover effect.
vkw91's Avatar
Ultra Talker

Latest Blog Post:
Good Web Design Guide - part 1
Posts: 314
Name: Vicky
Location: Wales
Trades: 0
Cheers Adam, I knew it would be easy, but its just one of those weeks!
__________________
Blog (new):
Please login or register to view this content. Registration is FREE

Portfolio:
Please login or register to view this content. Registration is FREE

Techno Pup:
Please login or register to view this content. Registration is FREE

vkw91 is offline
Reply With Quote
View Public Profile Visit vkw91's homepage!
 
Reply     « Reply to Adding a timer on mouseover effect.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11180 seconds with 12 queries