1

Topic: Unit appearance at induction JS - JavaScript

Good afternoon
Is span at it there is a class, it is necessary that at induction on it of the mouse cursor there was a small unit. Made which that but that that does not work
<span class = "vopros_min_partiya"> in  "</span> a minimum batch </span>
mause.onmouseover=function () {
var mod=document.getElementsByClassName ("modalka") [0];
mod.classList.add ("modalvisible");
}
mause.onmouseout=function () {
var out=document.getElementsByClassName ("modalka") [0];
out.classList.remove ("modalvisible");
}

2

Re: Unit appearance at induction JS - JavaScript

angrybot;
[Whether spoiler So?]

<! DOCTYPE HTML>
<html>
<head>
<title> tmp </title>
<meta http-equiv = "Content-Type" content = "text/html; charset=utf-8">
<meta http-equiv = "Cache-Control" content = "no-cache, no-store, must-revalidate"/>
<meta http-equiv = "Pragma" content = "no-cache"/>
<meta http-equiv = "Expires" content = "0"/>
<meta http-equiv = "X-UA-Compatible" content = "IE=edge"/>
<link rel = "stylesheet" type = "text/css" href = "index.css">
<style>
*, *:before, *:after {box-sizing:border-box; outline:0; font:12px verdana;}
.vopros-min-partiya {
position:relative;
top:50px; left:100px;
border:1px solid #aaa;
padding:10px;
}
.modalka {
position:absolute;
background:#eea;
border:1px solid #FFD700;
padding:5px;
display:none;
}
</style>
</head>
<body>
<span id = "min1" class = "vopros-min-partiya"> a minimum batch </span>
<div class = "modalka"> Floating <br> the message </div>
<script>
' use strict ';
function gid (i) {return document.getElementById (i);}
function QS (el, s) {return el.querySelector (s);}
var min1 = gid (' min1 '), ms = QS (document, '.modalka ').style;
min1.onmouseover = function () {
var box = this.getBoundingClientRect ();
ms.left = box.left + 5 + ' px ';
ms.top = box.bottom - 5 + ' px ';
ms.display = ' block ';
}
min1.onmouseout = function () {
ms.display = ' none ';
}
</script>
</body>
</html>

[/spoiler]

3

Re: Unit appearance at induction JS - JavaScript

Directly in a hole)
only  with appearance and all super)