-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.html
296 lines (227 loc) · 10.4 KB
/
examples.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!DOCTYPE HTML>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
<head>
<title>Tikslus Sticky examples</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/tikslussticky.js"></script>
<script type="text/javascript" src="js/rainbow.min.js"></script>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/github.css" />
<style>
body{
padding:20px;
}
</style>
</head>
<body>
<h1 class="main_heading">Tikslus Sticky</h1>
<p>Tikslus Sticky allows any HTML content to stick to screen when user scrolls down</p>
<p>You can see live examples on this page</p>
<p>Include jquery,tikslussticky.js files </p>
<pre>
<code data-language="javascript">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/tikslussticky.js"></script>
</code>
</pre>
<h4 class="heading">Example 1: Simple text </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:'hello world !',
customID:'hello',
stickAt:'center-left'
});
</code>
</pre>
<!-- code implementation -->
<script language="javascript">
$.fn.tikslussticky({
content:'hello world !',
customID:'hello',
stickAt:'center-left'
});
</script>
<h4 class="heading">Example 2: User Registration Link </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"<div style='width:100px;height:50px'><a href='#'>Sign Up now !</a></div>",
customID:'signup',
stickAt:'center-right'
});
</code>
</pre>
<!-- code implementation-->
<script language="javascript">
$.fn.tikslussticky({
content:"<a href='#'>Sign Up now !</a>",
customID:'signup',
stickAt:'center-right'
});
</script>
<h4 class="heading">Example 3: Print command </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"<div style='height:50px;width:120px;'><a href='#'>PRINT</a></div>",
customID:'signup',
stickAt:'top-center'
});
</code>
</pre>
<!-- code implementation-->
<script language="javascript">
$.fn.tikslussticky({
content:"<div style='height:50px;width:120px'><a href='#'>PRINT</a></div>",
customID:'print',
stickAt:'top-center'
});
</script>
<h4 class="heading">Example 4: Advertisment Banner </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"<div><a href='#'><img src='banner.jpg'/></a></div>",
customID:'signup',
stickAt:'bottom-center'
});
</code>
</pre>
<!-- code implementation-->
<script language="javascript">
$.fn.tikslussticky({
content:"<div style='display:block'><a href='#'><img src='banner.jpg'/></a></div>",
customID:'banner',
stickAt:'bottom-center'
});
</script>
<h4 class="heading">Example 5: Subscribe </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"<div><form method='post' action='some action'><div><label>Email id:</label><input type='text' name='email'></div><div><input type='button' value='Subscribe'></div></form></div>",
customID:'subscribe',
stickAt:'top-right'
});
</code>
</pre>
<!-- code implementation -->
<script language="javascript">
$.fn.tikslussticky({
content:"<div><form method='post' action='some action'><div><label>Email id:</label><input type='text' name='email'></div><div><input type='button' value='Subscribe'></div></form></div>",
customID:'subscribe',
stickAt:'top-right'
});
</script>
<h4 class="heading">Example 6: Download </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"<a href='#'>Download</a>",
customID:'download',
stickAt:'bottom-left'
});
</code>
</pre>
<!-- code implementation-->
<script language="javascript">
$.fn.tikslussticky({
content:"<a href='#'>Download</a>",
customID:'download',
stickAt:'bottom-left'
});
</script>
<h4 class="heading">Example 7: Simple text Stick At 'top-left' </h4>
<p>Javascript</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"Sticky me",
customID:'hellosticky',
stickAt:'top-left'
});
</code>
</pre>
<script language="javascript">
$.fn.tikslussticky({
content:"Sticky me",
customID:'hellosticky',
stickAt:'top-left'
});
</script>
<br/>
<br/>
<table width="100%" class="table">
<tr>
<th>Parameter</th><th>Default value</th><th>Allowed Value</th><th>Description</th>
</tr>
<tr>
<td>Content</td><td>''</td><td>Any HTML content</td><td>Content displayed in sticky</td>
</tr>
<tr>
<td>stickAt</td><td>'top-left'</td><td>Can Be: top-left,top-center,top-right,center-left,center-right,bottom-left,bottom-right,bottom-center,custom</td><td>Defines the postion</td>
</tr>
<tr>
<td>bkColor</td><td>#000</td><Td>Valid color code (HEX value)</Td><Td>Background color of stikcy</td>
</tr>
<tr>
<td>fontColor</td><td>#fff</td><td>Valid color code (HEX value)</td><td>Font color</td>
</tr>
<tr>
<td>opacity</td><td>0.7</td><td>value from 0-1</td><td>Opacity of sticky</td>
</tr>
<tr>
<td>customClass</td><td>''</td><td>Any css class</td><td>You can apply a custom css class to change the look of sticky</td>
</tr>
<tr>
<td>fontSize</td><td>14</td><td>Valid font size</td><td>Font size used in sticky</td>
</tr>
<tr>
<td>fontBold</td><td>TRUE</td><td>True OR False</td><td>Font are shown bold if this property is set to TRUE</td>
</tr>
<tr>
<td>padding</td><td>5px</td><td>Text padding with 'px'</td><td>Padding applied to sticky</td>
</tr>
<tr>
<td>width</td><td>''</td><td>Valid width for sticky</td><td>Custom width applied to sticky</td>
</tr>
<tr>
<td>height</td><td>''</td><td>Valid height for sticky</td><td>Custom Height applied to sticky</td>
</tr>
<tr>
<td><ul>
<li>customLeft</li>
<li>customRight</li>
<li>customTop</li>
<li>customBottom</li>
</ul></td><td>''</td><td>valid values in pixel (with px)</td><td>Custom positions will only apply if you set stickAt:'custom'
<br/>
<p>Example</p>
<pre>
<code data-language="javascript">
$.fn.tikslussticky({
content:"stick at custom position",
customID:'custom122',
stickAt:'custom',
customLeft:'60px',
customRight:'',
customTop:'100px',
customBottom:''
});
</code>
</pre>
</td>
</tr>
</table>
</body>
</html>