Mouseover

Mouseover

In computing a mouseover, mouse hover or hover box refers to a GUI event that is raised when the user moves or "hovers" the cursor over a particular area of the GUI. The technique is particularly common in web browsers where the URL of a hyperlink can be viewed in the status bar. Site designers can easily define their own mouseover events using Javascript[1] and Cascading Style Sheets.[2] In case of multiple layers the mouseover event is triggered by the uppermost layer.

Mouseover events are not limited to web design and are commonly used in modern GUI programming. Their existence might not even be known to the user as the events can be used to call any function and might affect only the internal workings of the program.

Example: <abbr title="Mouseover text">Normal text</abbr> gives Normal text

Contents

Tooltip

A special usage of mouseover event is a tooltip showing a short description of the GUI object under the cursor. The tooltip generally appears only after the mouse is held over the object for a certain amount of time.

Examples

<!-- Direct usage not recommended | does not conform with web standards -->
<img id="myImage" src="/images/myImage.jpg" onMouseOver="alert('your message');">


// javascript without any framework
var myImg = document.getElementById('myImage');
 
function myMessage() {
    alert('your message');
}
 
if(myImg.addEventListener) { //addEventListener is the standard method to add events to objects
    myImg.addEventListener('mouseover', myMessage, false);
}
 
else if(myImg.attachEvent) { //for Internet Explorer
    myImg.attachEvent('onmouseover', myMessage);
}
 
else { //for other browsers
    myImg.onmouseover = myMessage;
}


// jQuery example | degrades well if javascript is disabled in client browser
$("img").mouseover(function(){
   alert('your message');
});

References

External links

  • Hidden CSS Menu—A multilevel mouseover-menu in pure CSS (i.e. no JavaScript)
  • DontClick.it: Demonstration of navigation using only mouseover (requires Flash Player)

Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • mouseover — see ↑rollover under ↑roll • • • Main Entry: ↑mouse …   Useful english dictionary

  • Mouseover — Dieser Artikel oder Abschnitt bedarf einer Überarbeitung. Näheres ist auf der Diskussionsseite angegeben. Hilf mit, ihn zu verbessern, und entferne anschließend diese Markierung …   Deutsch Wikipedia

  • mouseover — noun The event of a pointing device on screen pointer being over an on screen shape, usually a box …   Wiktionary

  • MouseOver — siehe Rollover Rollover …   Online-Wörterbuch Deutsch-Lexikon

  • mouseover — n. rollover, JavaScript element in a Web page that triggers a visual change when the mouse cursor passes over it (Internet) …   English contemporary dictionary

  • Mao Zedong — Mao redirects here. For other uses, see Mao (disambiguation). This is a Chinese name; the family name is Mao. Mao Ze dong 毛泽东 Official 1967 Portrait of Mao Ze …   Wikipedia

  • DOM events — DOM (Document Object Model) events allow event driven programming languages like JavaScript, JScript, ECMAScript, VBScript and Java to register various event handlers/listeners on the element nodes inside a DOM tree, e.g. HTML, XHTML, XUL and SVG …   Wikipedia

  • Cursor (computers) — A blinking text cursor, stopped in the middle of typing the word Wikipedia. In computing, a cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing… …   Wikipedia

  • Rollover (web design) — Rollover refers to a button as created by a web developer or web designer, found within a web page, used to provide interactivity between the user and the page itself. The term rollover in this regard originates from the visual process of rolling …   Wikipedia

  • .svg — Vorlage:Infobox Dateiformat/Wartung/magic fehltVorlage:Infobox Dateiformat/Wartung/website fehlt Scalable Vector Graphics Dateiendung .svg, .svgz …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”