-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
167 lines (146 loc) · 5.55 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Center Loader jQuery Plugin</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/prettify.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target=".navbar">
<section id="home">
<div class="center-loader masthead">
<div class="container">
<h1>Center Loader jQuery</h1>
<p>A simple jQuery center loader plugin.</p>
<p><a href="http://plugins.rohitkhatri.com/center-loader/center-loader.zip" class="btn btn-primary btn-large">Download</a></p>
<ul class="masthead-links">
<li><a href="http://github.com/rohitkhatri/center-loader">GitHub project</a></li>
<li>Version 1.0.0</li>
</ul>
</div>
</div>
<div class="social-btns">
<div class="container">
<ul class="social-links">
<li>
<iframe src="http://ghbtns.com/github-btn.html?user=rohitkhatri&repo=center-loader&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95px" height="20px"></iframe>
</li>
<li>
<iframe src="http://ghbtns.com/github-btn.html?user=rohitkhatri&repo=center-loader&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="95px" height="20px"></iframe>
</li>
<li>
<iframe src="http://ghbtns.com/github-btn.html?user=rohitkhatri&type=follow&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="165px" height="20px"></iframe>
</li>
</ul>
</div>
</div>
</section>
<section id="demo">
<div class="container">
<div class="page-header">
<h1>Installation <small>easy to install</small></h1>
</div>
<p>Include these scripts at the top of your page in head section.</p>
<pre class="prettyprint linenums"><script src="js/jquery.min.js"></script>
<script src="center-loader.js"></script></pre>
<!-- -->
</div>
</section>
<section id="demo">
<div class="container">
<div class="page-header">
<h1>Image Loader</h1>
</div>
<p>Hover the box below to show hide loader.</p>
<!-- -->
<div class="example" index="0">
<div class="demo"></div>
</div>
<!-- -->
<pre class="prettyprint linenums">$('#example_1').loader('show','<img style="height:35px; width:35px;" src="img/loader1.gif">');</pre>
<!-- -->
</div>
</section>
<section id="demo">
<div class="container">
<div class="page-header">
<h1>Font Awesome Loader</h1>
</div>
<p>Include font awesome css to use these loaders</p>
<pre class="prettyprint linenums"><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"></pre>
<!-- -->
<div class="example" index="1">
<div class="demo"></div>
</div>
<!-- -->
<pre class="prettyprint linenums">$('#example_2').loader('show','<i class="fa fa-2x fa-spinner fa-spin"></i>');</pre>
<!-- -->
<div class="example" index="2">
<div class="demo"></div>
</div>
<pre class="prettyprint linenums">$('#example_3').loader('show','<i class="fa fa-2x fa-circle-o-notch fa-spin"></i>');</pre>
<div class="example" index="3">
<div class="demo"></div>
</div>
<pre class="prettyprint linenums">$('#example_4').loader('show','<i class="fa fa-2x fa-refresh fa-spin"></i>');</pre>
<div class="example" index="4">
<div class="demo"></div>
</div>
<pre class="prettyprint linenums">$('#example_5').loader('show','<i class="fa fa-2x fa-cog fa-spin"></i>');</pre>
<div class="example" index="5">
<div class="demo"></div>
</div>
<pre class="prettyprint linenums">$('#example_6').loader('show','<i class="fa fa-2x fa-spinner fa-pulse"></i>');</pre>
</div>
</div>
</section>
<section id="demo">
<div class="container">
<div class="page-header">
<h1>Hide <small>hide the loader</small></h1>
</div>
<pre class="prettyprint linenums">$('#example').loader('hide');</pre>
<!-- -->
</div>
</section>
<section style="margin-top: 50px; margin-bottom: 50px; height: 10px;">
<!-- Take up space -->
</section>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/prettify.js"></script>
<script src="center-loader.js"></script>
<script>
var loaders = [
'<img style="height:35px; width:35px;" src="img/loader1.gif">',
'<i class="fa fa-2x fa-spinner fa-spin"></i>',
'<i class="fa fa-2x fa-circle-o-notch fa-spin"></i>',
'<i class="fa fa-2x fa-refresh fa-spin"></i>',
'<i class="fa fa-2x fa-cog fa-spin"></i>',
'<i class="fa fa-2x fa-spinner fa-pulse"></i>'
];
$(document).ready(function()
{
prettyPrint();
$('.example').each(function(index){
$(this).attr('id','example_'+(index+1));
$(this).loader('show',loaders[index]);
});
$('.example').hover(function(){
$(this).loader('hide');
$(this).find('.demo').html('<p>Loading has finished</p>');
},function(){
$(this).loader('show',loaders[$(this).attr('index')]);
$(this).find('.demo').html('');
});
});
</script>
</body>
</html>