Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Delay onmouseover effect for 1 second

Posted on 2006-07-08
2
349 Views
Last Modified: 2012-06-22
in the following script there is only one modication that I wish to make, that is I want the mouse to hover over the link for 1 second before the mouseover effect takes place, is this possible

<a  onmouseover="javascript:this.style.cursor='hand';window.open('http://whatever.html','mypage','')"</A>
0
Comment
Question by:kempvet
2 Comments
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 500 total points
ID: 17067035
<SCRIPT LANGUAGE="JavaScript">
var TimerID = 0;
function StartOver() {
  TimerID = setTimeout('ActivateOver()', 1000);
}

function StopOver() {
  if (TimerID) {
        clearTimeout(TimerID);
            TimerID = 0;
      }
}

function ActivateOver() {
  window.open('http://whatever.html','mypage','');
}
</SCRIPT>

<a href="javascript:;" onmouseover="StartOver()" onmouseout="StopOver()">Test me</a>
0
 

Author Comment

by:kempvet
ID: 17067069
thanks, I suspected that a function may need to be called, this then saves the hassle when someone is moving their mouse to another page and just flicking over the link,
regards
kempvet
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JavaScript let vs var 5 34
How can I repeat this modal box over and over again...? 2 24
ASP.NET Content Page 3 25
2 separate CSS animations 2 16
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question