-
Notifications
You must be signed in to change notification settings - Fork 24
/
demo-simpleloader-startstop.html
147 lines (125 loc) · 4.85 KB
/
demo-simpleloader-startstop.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
<!DOCTYPE html>
<html>
<head>
<title>jQuery IntroLoader Demo</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,600,700,800,300' rel='stylesheet' type='text/css'>
<link href="demo.css" rel="stylesheet">
<!-- PLUGIN INCLUSION ------------------------------------- -->
<!-- css -->
<link href="../dist/css/introLoader.css" rel="stylesheet">
<!-- jQuery, Helpers and jqueryIntrLoader -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="../dist/helpers/jquery.easing.1.3.js"></script>
<script src="../dist/helpers/spin.min.js"></script>
<script src="../dist/jquery.introLoader.js"></script>
<!-- -------------------------------------------------------- -->
</head>
<body>
<div id="element" class="introLoading"></div>
<h1>jqueryIntroLoader demopage</h1>
<h3>
simpleLoader Animation - stop()<br>
<small>
This is an example of manual plugin start and stop.
</small>
</h3>
<p>
<a href="index.html" class="button backtoindex" title="Default Options Demo">Back to Demos Index</a>
</p>
<h3>Try to Start/Stop Plugin</h3>
<p class="controlsButtons">
<span id="startPlugin">Click to Start Plugin</span> <span id="stopPlugin">Click to Stop Plugin</span>
</p>
<div id="ajaxTest" style="border:1px solid #ccc; width:500px; height:200px;">
<div id="dynElement">
</div>
</div>
<h3>Example Javascript Code</h3>
<code><pre>
// INTRO (auto plugin stop)
$("#element").introLoader({
animation: {
name: 'simpleLoader',
options: {
effect:'slideDown',
ease: "easeInOutCirc",
style: 'fluoMagenta',
delayTime: 1000, //delay time in milliseconds
animationTime: 500,
onAfter: function() {alert('onAfter');}
}
},
spinJs: {
lines: 10, // The number of lines to draw
length: 10, // The length of each line
radius: 30, // The radius of the inner circle
width: 8, // The line thickness
color: '#fff' // #rgb or #rrggbb or array of colors
}
});
// START
$('#startPlugin').on('click', function() {
$("#dynElement").introLoader({
animation: {
name: 'simpleLoader',
options: {
stop: false,
fixed: false
}
}
});
});
// STOP
$('#stopPlugin').on('click', function() {
var loader = $('#dynElement').data('introLoader');
loader.stop();
});
</pre></code>
<script>
$(document).on('ready', function() {
$("#element").introLoader({
animation: {
name: 'simpleLoader',
options: {
effect:'slideUp',
ease: "easeInOutCirc",
style: 'dark'
}
},
spinJs: {
lines: 13, // The number of lines to draw
length: 20, // The length of each line
width: 10, // The line thickness
radius: 30, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
color: '#fff', // #rgb or #rrggbb or array of colors
}
});
$('#startPlugin').on('click', function() {
$("#dynElement").introLoader({
animation: {
name: 'simpleLoader',
options: {
stop: false,
fixed: false
}
}
});
});
$('#stopPlugin').on('click', function() {
var loader = $('#dynElement').data('introLoader');
loader.stop();
});
});
</script>
<!-- Google Analytics -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','47727083');ga('send','pageview');
</script>
</body>
</html>