-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
68 lines (68 loc) · 3.73 KB
/
index.php
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
<!DOCTYPE html>
<html>
<head>
<title>dev page</title>
<link href="http://src.extempl.com/css/basic.css" rel="stylesheet">
<link href="http://src.extempl.com/css/demo.css" rel="stylesheet">
<link href="css/hint.css" rel="stylesheet">
<script type="text/javascript" src="http://src.extempl.com/js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.simplehint.js"></script>
<script type="text/javascript">
$(function() {
$.initHint({
wide : <?=(isset($_GET['wide']) && $_GET['wide'] == 1 ? 'true' : 'false')?>, // false by default, if true - then all hints will be stretchable
width : '<?=(isset($_GET['width']) && $_GET['width'] ? $_GET['width'] : '200px')?>', // 200px by default. When it not stretchable and text length > than 25, then block will have fixed width
integrated: <?=(isset($_GET['integrated']) && $_GET['integrated'] == 0 ? 'false' : 'true')?> // true by default. If set true, then will use title attributes, if false - data-hint-value attributes
})
});
</script>
</head>
<body>
<header>
<p class="preface">This is the demo of <a href="https://github.com/extempl/simplehint">SimpleHint jQuery plugin</a></p>
</header>
<div class="main-block block-list">
<ul class="inside-block block-list">
<li><a href="op" title>1asdasdad</a></li>
<li><a href="op" title="oppa 111122222 33333">here is title with line-break</a></li>
<li><a href="op" data-hint-value="hehehe">here is data-hint-value</a></li>
<li><a href="op" title="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum">here is long text</a></li>
</ul>
<div class="inside-block block-list" title="<img src='http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif' />" data-hint-mode="wide">
hover me! I'm with data-hint-mode="wide" and image (title)
</div>
</div>
<div class="main-block block-list">
<form action>
<ul>
<li>
<label for="width">width:</label>
<input name="width" id="width" value="200px" />
</li>
<li>
<label for="wide">global wide:</label>
<input name="wide" id="wide" value="0" />
</li>
<li>
<label for="integrated">integrated:</label>
<input id="integrated" name="integrated" value="1" />
</li>
<li>
<input type="submit" />
</li>
</ul>
</form>
</div>
<div class="main-block block-list" style="position:absolute; right:0; bottom:0;">
<ul class="inside-block block-list">
<li><a href="op">1asdasdad</a></li>
<li><a href="op" title="oppa">here is title</a></li>
<li><a href="op" data-hint-value="hehehe">here is data-hint-value</a></li>
<li><a href="op" title="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum">here is long text</a></li>
</ul>
<div class="inside-block block-list" title="<img src='http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif' />" data-hint-mode="wide">
hover me! I'm with data-hint-mode="wide" and image (title)
</div>
</div>
</body>
</html>