-
Notifications
You must be signed in to change notification settings - Fork 0
/
Inhale_xHTML.html
49 lines (47 loc) · 2.87 KB
/
Inhale_xHTML.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html><!-- blow plugin elements to parent <body onload="parent.ParentPAGE = window;">-->
<style>
#info {color: GREEN; background: aliceblue;}
#themeMENU {position: absolute; z-index: 9; top:0; width: max-content; background-color: #f1f1f1; padding: 4px;
font-family: 'Open Sans', sans-serif; border: 1px solid #d3d3d3;}
#themeMENUheader{ float:left; padding: 1px; z-index: 10; background-color: #000; font-size: 23px; color:white; cursor: move;}
#themeMENUlist { float:left; z-index: 10; background-color: #2196F3; color:yellow;}
#themeMENUlist input{ width: 22px; height: 22px;}
</style>
<body>
<span id='info'> Das xHTML inhaled TO Host only with modules. IT IS DRAGABLE move with mouse and apply imported JS</span>
<div id="themeMENU">
<div id="themeMENUheader">Inhaler_xHTML</div>
<div id="themeMENUlist">
<input id='basic' onchange="check(this)" type='radio' name='rtoggle' value='red' ><label for='basic'>RED</label>
<input id='streets' onchange="check(this)" type='radio' name='rtoggle' value='yellow'> <label for='streets'>POP</label>
<input id='bright' onchange="check(this)" type='radio' name='rtoggle' value='beige'> <label for='bright'>BEI</label>
<input id='light' onchange="check(this)" type='radio' name='rtoggle' value='lightgray'> <label for='light'>GRAY</label>
<input id='dark' onchange="check(this)" type='radio' name='rtoggle' value='darkgray'> <label for='dark'>drk</label>
<input id='satellite' onchange="check(this)" type='radio' name='rtoggle' value='gold'> <label for='satellite'>GOLD</label>
</div>
</div>
<script>//Make the DIV element draggable:
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
if (document.getElementById(elmnt.id + "header")) {
document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;/* if present, the header is where you move the DIV from:*/
} else {elmnt.onmousedown = dragMouseDown;}/* otherwise, move the DIV from anywhere inside the DIV:*/
function dragMouseDown(e) {e = e || window.event; e.preventDefault();
pos3 = e.clientX;pos4 = e.clientY;// get the mouse cursor position at startup:
document.onmouseup = closeDragElement;
document.onmousemove = elementDrag; // call a function whenever the cursor moves:
}
function elementDrag(e) {e = e || window.event; e.preventDefault();
pos1 = pos3 - e.clientX; pos2 = pos4 - e.clientY; pos3 = e.clientX; pos4 = e.clientY;// calculate the new cursor position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";// set the element's new position:
}
function closeDragElement() {/* stop moving when mouse button is released:*/
document.onmouseup = null;
document.onmousemove = null;
}
}
dragElement(document.getElementById("themeMENU"));
</script>
</body>
</html>