-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
49 lines (49 loc) · 1.39 KB
/
demo.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>
<head>
<meta charset="utf-8"/>
<link href="https://rawgit.luolix.top/wordgold/wg-s-code/master/css/reset.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link href="tip.css" rel="stylesheet" type="text/css" />
<script src="tip.js"></script>
<title>Tip-页面提示插件</title>
<style type="text/css">
input{
width: 240px;
margin: 9px;
}
</style>
</head>
<body>
<header>
<h1>Tip-页面提示插件</h1>
<p>一个添加页面提示的js插件,只有1K大小。</p>
<p>在HTML页面内的元素后添加各种小提示。</p>
<p><a href="http://git.yu123.me/tip" class="lightbtn">项目地址</a></p>
</header>
<h3>使用方法</h3>
<p>这是一个jquery插件,使用方法为: <b>$("Selectors").tip(optitons)</b> </p>
<p>由于表现和逻辑分离,使用前请自行导入 <b>tip.css</b> 文件内容</p>
<p>为防止IE6崩溃,请在页面加载完毕后执行</p>
<h3>Demo</h3>
<p><input type="text" id="input"></p>
<pre>
<script>
$(function(){
var $i=$("#input").on({
focus:function(){
$i.tip(0,"请尝试点击下页面其他部分");
},
blur:function(){
$i.tip();
}
});
$i.tip(1,"请尝试输入一些内容");
})
</script>
</pre>
<footer>
Created by <a href="http://yu123.me">Wordgold</a>
</footer>
</body>
</html>