-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
74 lines (74 loc) · 2 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">
*{
margin: 0px;
border: 0px;
}
#div1{
margin: 50px;
float: left;
background-color:#000;
width:200px;
height:200px
}
#div2{
margin: 50px;
float: left;
background-color:#999;
width:200px;
height:200px
}
#div3{
margin: 50px;
float: left;
background-color:green;
width:200px;
height:200px
}
#div4{
margin: 50px;
float: left;
background-color:blue;
width:200px;
height:200px
}
#svg_contains{
clear: both;
}
</style>
<!-- This is the main library-->
<script src="src/svgDynamicDirectionalPath.js" charset="utf-8"></script>
<script type="text/javascript">
document.onreadystatechange = () =>
{
if(document.readyState === 'complete')
{
var div1=document.getElementById('div1');
var div2=document.getElementById('div2');
var div3=document.getElementById('div3');
var div4=document.getElementById('div4');
// dynamicPath helps to create a directional path between two div elements.
dynamicPath(div1,div2);
dynamicPath(div1,div3);
dynamicPath(div1,div4);
dynamicPath(div2,div3);
dynamicPath(div2,div4);
dynamicPath(div3,div4);
}
}
</script>
<meta charset="utf-8">
<title>SVG Directional Dynamic Path</title>
</head>
<body id='body'>
<!-- Here all 4 div element consist-->
<div id='main_div'>
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
</div>
</body>
</html>