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

Latest Blog Post:
Good Web Design Guide - part 1
Posts: 290
Name: Vicky
Location: Wales
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!
__________________
Portfolio: www.vkw91.co.uk
Techno Pup: www.technopup.co.uk

vkw91 is offline
Reply With Quote
View Public Profile Visit vkw91's homepage!
 
When You Register, These Ads Go Away!
Old 10-31-2007, 10:08 AM Re: Adding a timer on mouseover effect.
ADAM Web Design's Avatar
Canadastaninianite

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

1000 represents the time in milliseconds (in this case, exactly 1 second.) Adjust as needed.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-31-2007, 10:45 AM Re: Adding a timer on mouseover effect.
vkw91's Avatar
Ultra Talker

Latest Blog Post:
Good Web Design Guide - part 1
Posts: 290
Name: Vicky
Location: Wales
Cheers Adam, I knew it would be easy, but its just one of those weeks!
__________________
Portfolio: www.vkw91.co.uk
Techno Pup: www.technopup.co.uk

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

Thread Tools

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

vB 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.12026 seconds with 12 queries