computer
 






 

Question by  spyyogeshgmailcom (21)

How do you add the hover command to a Javascript file?

 
+8

Answer by  emstorm73 (26)

The "hover" event is known as "onMouseOver". So, to activate some script function on hover, add the following to the HTML tag you want to hover: onMouseOver='javascriptFunctionGoesHere(event);' Sending along the event object gives you access to lots of information about what was hovered over, so you can reuse your function. This is for straight Javascript, not a library like jQuery.

 
+8

Answer by  Alyaron (233)

You don't add the hover command "to a Javascript file", you add it directly to the HTML content. In HTML, it's called onMouseOver. Say that you want to alert the user when the mouse comes over a specific link, you'll add this to the 'a' tag: onMouseOver="javascript:alert('Hello')"

 
+5

Answer by  ahsanmahmoodawan (1169)

You don't add the hover command "to a javascript file", you add it directly to the html content html , it's cakked in mouseover .say that you want to alert the user when the mouse comes over a specific link, you will add this to the "a" tag :on mouseover= "java script" :alert(hello')"

 
+4

Answer by  Lakshmi65 (715)

In javascript file hover command can be added by writing separately in a text file and ftp. The hover command can be kept in a text file or ftp command.

 
+4

Answer by  zackf (105)

Try using the onMouseOver() browser event to detect when the mouse is above a selected element, like so: x. onMouseOver() { alert("Get your mice off of me. "); }; onMouseOut detects when the mouse leaves the element as well.

 
+1

Answer by  japratt (1687)

If you are wanting to add any such kind of hover command you would need to first save the type of file.

 
You have 50 words left!