forked from Sebobo/jquery.smallipop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1242 lines (1131 loc) · 56.2 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
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<title>Smallipop - A versatile jQuery plugin for displaying tooltips</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="keywords" content="jquery,tooltip,popup,plugin,css3,open-source,mit-license,extension,overlay" />
<meta name="description" content="Smallipop is a versatile jQuery plugin for displaying tooltips. It has automatic layout, pure css, free positioning, small size and much more!" />
<meta http-equiv="content-language" content="en">
<meta name="author" content="Sebastian Helzle"/>
<link rel="stylesheet" href="css/contrib/animate.min.css" type="text/css" media="all" title="Screen" />
<link rel="stylesheet" href="css/jquery.smallipop.css" type="text/css" media="all" title="Screen" />
<link rel="stylesheet" href="css/screen.css" type="text/css" media="all" title="Screen" />
</head>
<body>
<div class="pageHeader hasShadow">
<h1 id="docustart">Smallipop - A versatile jQuery plugin for displaying beautiful tooltips</h1>
<p>
<b>Version 0.5.0</b> -
Created by <a href="http://www.sebastianhelzle.net" target="_blank" title="Sebastian Helzle Portfolio">Sebastian Helzle</a>
for <a href="http://www.small-improvements.com" target="_blank" title="Small Improvements - 360 Feedback">Small Improvements</a>
</p>
<br/>
<ul class="tabs">
<li>
<a href="/" title="Projects overview">Home</a>
</li>
<li class="selected">
<a href="/jquery.smallipop" title="jQuery smallipop - A tooltip plugin">Smallipop</a>
</li>
<li>
<a href="/jquery.rondell" title="jQuery rondell - A graphical plugin for carousels and more">Rondell</a>
</li>
<li>
<a href="https://github.com/SmallImprovements/jquery.smallimap" target="_blank" title="jQuery smallimap - An interactive map plugin">Smallimap</a>
</li>
</ul>
</div>
<div class="side-menu">
<h2>Chapters</h2>
<ul>
<li><a class="scrollToId current smallipopHorizontal" href="#introduction" title="What smallipop is about">Introduction</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#createsmallipop" title="Multiple ways to create a smallipop">How to create a smallipop</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#imagedemo" title="Image with smallipops">Image with markers</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#textdemo" title="Inline text smallipops">Text with inline hints</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#tours" title="Tour">Create a tour</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#advanced" title="Advanced techniques for smallipop">Advanced configuration</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#themes" title="Make it look your way">Themes</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#options" title="Customize smallipop the way you like">Options</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#methods" title="Control smallipop via javascript">Methods</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#installation" title="How to get it up and running">Installation</a></li>
<li><a class="scrollToId smallipopHorizontal" href="#features" title="What it does and what's new">Features & changes</a></li>
</ul>
</div>
<div class="page hasShadow" id="introduction">
<div class="smallipopOrange floatRight" data-smallipop-tour-highlight="true">
<img src="images/smallipop-logo.png" alt="smallipop logo" title="The smallipop logo" />
<div class="smallipopHint">
<b>smallipop</b><br/>
<br/>
Created by <a href="http://www.sebastianhelzle.net" target="_blank" title="Sebastian Helzle Portfolio">Sebastian Helzle</a>
</div>
</div>
<h3 class="hidden">About</h3>
<p>
This is a <a href="http://www.jquery.com" title="jQuery">jQuery</a> plugin for displaying tooltips.<br/>
There are a lot of other plugins for this task, but they didn't meet our <br/>
various requirements at <a href="http://www.small-improvements.com" target="_blank" title="Small Improvements - 360 Feedback">Small Improvements</a>.<br/>
<br/>
So finally we decided to create our own plugin and wanted to share it with you!
</p>
<br/>
<p>
<a href="https://github.com/Sebobo/jquery.smallipop/zipball/0.5.0" title="Download the most versatile tooltip plugin for jQuery" class="btn success smallipopWhite">
Download smallipop now
</a>
<a href="https://github.com/Sebobo/jquery.smallipop" target="_blank" title="Get the smallipop source at github" class="btn smallipopWhite">
Visit smallipop at github
</a>
</p>
<br/>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<!-- AddThis Button END -->
<br/>
<!-- Flattr button BEGIN -->
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://projects.sebastianhelzle.net/jquery.smallipop/"></a>
<noscript><a href="http://flattr.com/thing/461593/jQuery-Smallipop" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>
<!-- Flattr button END -->
<hr id="createsmallipop"/>
<div>
<h3>Create a smallipop</h3>
<p>
Here is the easiest way to create a smallipop
</p>
<div class="bs-docs-example">
<a class="smallipop sampleElement" href="#" title="That was easy!">
Hover me!
</a>
</div>
<pre class="prettyprint linenums">
<a class="myElement" href="#" title="That was easy!">Hover me!</a>
<script type="text/javascript">
$('.myElement').smallipop();
</script></pre>
<p>If you like some markup as tooltip, you can do that as well</p>
<div class="bs-docs-example">
<span class="smallipop sampleElement" style="display:inline-block;">
Hover me!
<span class="smallipopHint">
Give me some <b>markup</b>
</span>
</span>
</div>
<pre class="prettyprint linenums">
<span class="smallipop">
Hover me!
<span class="smallipopHint">
<b>Give me some markup!</b>
</span>
</span></pre>
<p>You can provide the content for the bubble via javascript too</p>
<div class="bs-docs-example">
<a href="#" id="tipcustomhint" class="sampleElement" title="I'm the old title">
Hover me!
</a>
</div>
<pre class="prettyprint linenums">
<a href="#" id="tipcustomhint" title="I'm the old title">
Hover me!
</a>
<script type="text/javascript">
$('#tipcustomhint').smallipop({}, "I'm the real hint!");
</script></pre>
<p>
There are cases when the trigger is replaced or changed when
clicked and the tooltip needs to be hidden
</p>
<div class="bs-docs-example">
<div id="ajaxContainer2">
<a href="#" id="tipkiller2" class="smallipop sampleElement" title="Click the link and I will be gone">
Hover me!
</a>
</div>
</div>
<pre class="prettyprint linenums">
<div id="sampleContainer">
<a href="#" id="tipkiller" class="smallipop" title="Click the link and I will be gone">
Hover me!
</a>
</div>
<script type="text/javascript">
$('#tipkiller').click(function(e) {
e.preventDefault();
$('#sampleContainer').html('<div>Some new content</div>');
});
</script></pre>
<p>Elements can be positioned everywhere, smallipop will be at the right position</p>
<div class="bs-docs-example">
<div class="floatLeft">
Look to the right
</div>
<div id="ajaxContainer" class="floatRight">
<div class="smallipop sampleElement">
Hover me!
<span class="smallipopHint">
<b>Markuptip with very long text</b><br/>
<a id="tipkiller" href="other.html">and a link with some javascript which replaces the trigger</a>
</span>
</div>
</div>
<br class="clear"/>
</div>
<pre class="prettyprint linenums">
<div class="smallipop">
Hover me!
<span class="smallipopHint">
<b>Markuptip with very long text</b><br/>
...
</span>
</div></pre>
<p>How about showing the bubble on the left or right of an element?</p>
<div class="bs-docs-example">
<span class="smallipopHorizontal sampleElement floatLeft">
Hover me!
<span class="smallipopHint">
Good for dropdowns!
</span>
</span>
<span class="smallipopHorizontal sampleElement floatRight">
Or me!
<span class="smallipopHint">
Auto align when there's no room on the right.
</span>
</span>
<br class="clear"/>
</div>
<pre class="prettyprint linenums">
<span class="smallipopHorizontal">
Hover me!
<span class="smallipopHint">
Good for dropdowns!
</span>
</span>
<script type="text/javascript">
$('.smallipopHorizontal').smallipop({
preferredPosition: 'right',
theme: 'black',
popupOffset: 10,
invertAnimation: true
});
</script></pre>
<p>Don't like animations? No Problem!</p>
<div class="bs-docs-example">
<a class="smallipopStatic sampleElement" title="Doesn't move an inch!">
Hover me!
</a>
</div>
<pre class="prettyprint linenums">
<a class="smallipopStatic" title="Doesn't move an inch">
Hover me!
</a>
<script type="text/javascript">
$('.smallipopStatic').smallipop({
theme: 'black',
popupDistance: 0,
popupYOffset: -14,
popupAnimationSpeed: 100
});
</script></pre>
<p>Change default positioning</p>
<div class="bs-docs-example">
<a class="smallipopBottom sampleElement" title="Below when possible">
Hover me!
</a>
</div>
<pre class="prettyprint linenums">
<a class="smallipopStatic" title="Below when possible">
Hover me!
</a>
<script type="text/javascript">
$('.smallipopBottom').smallipop({
theme: 'black',
preferredPosition: 'bottom'
});
</script></pre>
<h5>Special support for form elements</h5>
<p>
Smallipop will appear when form elements are focused and
stay even when the mouse leaves the input.
</p>
<div class="bs-docs-example">
<label>Text</label>
<input class="smallipopFormElement" type="text" size="30" title="Enter some text"/>
<br/>
<label>Password</label>
<input class="smallipopFormElement" type="password" size="30" title="Enter something like a password"/>
<br/>
<label>Select</label>
<select class="smallipopFormElement" title="Select something">
<option>Foo</option>
<option>Bar</option>
</select>
<br/>
<label>Textarea</label>
<textarea class="smallipopFormElement" title="Write what you want" cols="30" rows="4"></textarea>
<br/>
<label>Checkboxes</label>
<input type="checkbox" class="smallipopFormElement" title="Check it!"/>
<br/><br/>
<label class="inline">Yes</label>
<input type="radio" name="radioTest" class="smallipopFormElement" title="Yes I want it!"/>
<br/>
<label class="inline">No</label>
<input type="radio" name="radioTest" class="smallipopFormElement" title="Never!"/>
<br/>
<label class="inline">Maybe</label>
<input type="radio" name="radioTest" class="smallipopFormElement" title="Ok maybe..."/>
</div>
<pre class="prettyprint linenums">
<input class="smallipopInput" type="text" size="30" title="Enter some text"/>
<script type="text/javascript">
$('.smallipopInput').smallipop({
preferredPosition: 'right',
theme: 'black',
popupOffset: 0,
triggerOnClick: true
});
</script></pre>
</div>
<h5 id="imagedemo">Image with absolute positioned hints</h5>
<p>
Hints can be positioned anywhere, even on absolute positioned or floating elements.
</p>
<div class="bs-docs-example">
<div class="relative centered" style="width:600px;">
<img src="images/pic1.jpg" class="hasShadow hasBorder centered" width="600" height="450" alt="Bird in china" />
<div class="smallipopHideBlack" style="position:absolute; left:456px; top:49px; width:14px; height:14px;">
<div class="pulser"><div class="inner">+</div><div class="outer"> </div></div>
<div class="smallipopHint">
<b>Black hole sun</b>
</div>
</div>
<div class="smallipopHideTrans" style="position:absolute; left:320px; top:170px;">
<div class="indicator wobbler">
<div class="indicatorPlus">+</div>
<div class="indicatorArrow"> </div>
</div>
<div class="smallipopHint">
<b>The bird is the word</b><br/>
<br/>
This bubble has a white theme extended by another sub theme 'transparent'.<br/>
<br/>
Also the trigger is made out of pure css.
</div>
</div>
<div class="smallipopHideBlue" style="position:absolute; left:230px; top:370px;">
<img class="smallipopArrow wobbler" src="images/marker-arrow-blue.png" alt="arrow" />
<div class="smallipopHint">
<i>It's a house!</i><br/>
<br/>
It has an image as trigger.<br/>
We have provided some you can use in the <i>images</i> folder.
</div>
</div>
</div>
</div>
<pre class="prettyprint linenums">
<script type="text/javascript">
$('.myElement').smallipop({
hideTrigger: true, // Trigger is hidden when the bubble is shown
theme: 'white whiteTransparent', // White theme is used with it's transparent extension
popupYOffset: 20, // Bubble has a 20px vertical offset
popupDistance: 30, // Bubble travels vertically by 30px when fading in
popupOffset: 0, // No horizontal offset
});
</script></pre>
<h5 id="textdemo">Text with inline hints</h5>
<div class="bs-docs-example">
<div class="textbox centered hasShadow">
<h4>Something completely different</h4>
<div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor
<span class="smallipopBlue">
invidunt
<span class="smallipopHint">
Some info about <em>invidunt</em>
</span>
</span>
ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
<br/>
<div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et
<span class="smallipopBlue">
accusam
<div class="smallipopHint">
<h4>accusam</h4>
<img class="floatRight inline" src="images/pic1.jpg" alt="Bird in china" width="100" height="75" />
<p>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,
totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
</p>
<p>
Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit,
sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,
nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate
velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
</p>
</div>
</span>
et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</div>
</div>
<pre class="prettyprint linenums">
<p>
Some long <span class="smallipop">text</span>...
And more with a more
<span class="smallipop">
complex
<span class="smallipopHint">
Some really important hint about the word <b>complex</b>
</span>
</span>
hint...
</p>
<script type="text/javascript">
$('.smallipop').smallipop();
</script></pre>
<hr/>
<h5 id="tours">
<span class="smallipopTour" style="z-index:5;" data-smallipop-tour-index="1" title="This is the start of the tour. Try pressing the left and right arrow keys to control the tour.">Tours</span>
</h5>
<div class="bs-docs-example">
<a id="runTour" class="sampleElement">Click to start the tour</a>
<img style="float:right" src="images/smallipop-logo.png" class="smallipopTour" title="It can highlight elements too!" data-smallipop-tour-index="10" data-smallipop-tour-highlight="true"/>
<br/>
<br/>
<b class="smallipopTour" title="And this is the second step of the tour with a different tip alignment" data-smallipop-tour-index="3" data-smallipop-preferred-position="right">
This is some sample text
</b>
<img style="margin-left:200px;" src="images/marker-arrow-green.png" class="smallipopTour" title="And this is a marker and the end of the tour" data-smallipop-tour-index="12" data-smallipop-tour-highlight="true"/>
</div>
<pre class="prettyprint linenums">
<span class="smallipopTour" data-smallipop-tour-index="1">Step 1</span>
<span class="smallipopTour" data-smallipop-tour-index="2">Step 2</span>
<span class="smallipopTour" data-smallipop-tour-index="3" data-smallipop-preferred-position="right">Step 3</span>
<span class="smallipopTour" data-smallipop-tour-index="10">Step 4</span>
<script type="text/javascript">
$('.smallipopTour').smallipop();
</script></pre>
<hr id="advanced"/>
<h3>Advanced configuration</h3>
<div>
<h5>Change content on the fly and use callbacks</h5>
<div class="bs-docs-example">
<a id="tipChangeContent" class="sampleElement" title="Change">Hover me!</a>
</div>
<pre class="prettyprint linenums">
<a id="tipChangeContent" title="Change">
Hover me!
</a>
<script type="text/javascript">
$('#tipChangeContent').smallipop({
onAfterShow: function(trigger) {
$.smallipop.setContent("I'm the new content and replaced the old boring content!");
},
onBeforeHide: function(trigger) {
$.smallipop.setContent("Bye bye");
}
});
</script></pre>
<h5>Use referenced element as tooltip content</h5>
<div class="bs-docs-example">
<a id="tipReferenced" class="smallipop sampleElement" title="Referenced content" data-smallipop-referenced-content="#tipReferencedTarget">Hover me!</a>
<br/>
<br/>
<div id="tipReferencedTarget">
The real tooltip content!
</div>
</div>
<pre class="prettyprint linenums">
<a id="tipReferenced" data-smallipop-referenced-content="#tipReferencedTarget" title="Referenced content">
Hover me!
</a>
<div id="tipReferencedTarget">
The real tooltip content!
</div>
<script type="text/javascript">
$('#tipReferenced').smallipop();
</script></pre>
<h5>Use css animations</h5>
<p>
Example powered by
<a class="smallipop" target="_blank" href="http://daneden.me/animate" title="Just-add-water CSS animation">Animate.css</a>
</p>
<p>
These effects will only work if your browser support css animations.<br/>
When the Modernizr library is used and the browser doesn't support css animations the jQuery animations will be used as fallback.
</p>
<div class="bs-docs-example">
<a id="tipCSSAnimated" class="sampleElement" title="Smallipop can handle fancy animations too!">
Bounce and hinge
</a>
-
<a id="tipCSSAnimated2" class="sampleElement" title="Fancy animations part 2">
Flip
</a>
-
<a id="tipCSSAnimated3" class="sampleElement" title="Fancy animations part 3">
Fade
</a>
-
<a id="tipCSSAnimated4" class="sampleElement" title="Fancy animations part 4">
Rotate
</a>
</div>
<pre class="prettyprint linenums">
<a id="tipCSSAnimated" title="Fancy">
Hover me!
</a>
<script type="text/javascript">
$('#tipCSSAnimated').smallipop({
cssAnimations: {
enabled: true,
show: 'animated bounceInDown',
hide: 'animated hinge'
}
});
</script></pre>
<h5>Hide on click specials</h5>
<div class="bs-docs-example">
<span>Tip won't hide when clicking the trigger</span>
<a id="tipDontHideOnTriggerClick" class="sampleElement" title="Change">Hover me!</a>
<br/>
<br/>
<span>Tip wont't hide when clicking into the popup</span>
<span id="tipDontHideOnContentClick" class="sampleElement">
Hover me!
<span class="smallipopHint">
<b>Markuptip with very long text</b><br/>
<a href="#" onclick="return false;">
and a link which doesn't hide the popup
</a>
</span>
</span>
</div>
<pre class="prettyprint linenums">
<a id="tipDontHideOnTriggerClick" title="Change">
Hover me!
</a>
<a id="tipDontHideOnContentClick" title="Change">
Hover me!
<span class="smallipopHint">
<b>Markuptip with very long text</b><br/>
<a href="#" onclick="return false;">
and a link which doesn't hide the popup
</a>
</span>
</a>
<script type="text/javascript">
$('#tipDontHideOnTriggerClick').smallipop({
hideOnTriggerClick: false
});
$('#tipDontHideOnContentClick').smallipop({
hideOnPopupClick: false
});
</script></pre>
</div>
<hr id="themes"/>
<h3>Themes:</h3>
<p>Hover the links to see the different themes</p>
<div class="bs-docs-example">
<a href="#themes" class="smallipop sampleElement default" title="I'm a title with a long text">
Default theme
</a>
-
<a href="#themes" class="smallipopBlue sampleElement blue" title="I'm a title with a long text">
Blue theme
</a>
-
<a href="#themes" class="smallipopBlack sampleElement black" title="I'm a title with a long text">
Black theme
</a>
-
<a href="#themes" class="smallipopWhite sampleElement white" title="I'm a title with a long text">
White theme
</a>
-
<a href="#themes" class="smallipopOrange sampleElement orange" title="I'm a title with a long text">
Orange theme
</a>
</div>
<div class="bs-docs-example">
You can extend a theme with an extension theme
<span class="smallipopBlueFatShadow sampleElement">
Hover me!
<span class="smallipopHint">
Look at this fat shadow!
</span>
</span>
</div>
<pre class="prettyprint linenums">
<script type="text/javascript">
$('.myElement').smallipop({
theme: 'blue fatShadow'
});
</script></pre>
<p>
This allows you to have one basic theme and several subthemes with different border styles or colors for example.
</p>
<p>
The css for the extension theme looks like this:
</p>
<pre class="prettyprint linenums">
#smallipop.fatShadow {
-webkit-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
-moz-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}</pre>
<hr id="options"/>
<h3>Options</h3>
<p>
You can customize each smallipop with a lot of options and callbacks.<br/>
Most of the options can be defined via the html data attribute too. This will then only affect a single smallipop, which helps you customizing single smallipops without creating different calls for each configuration.
</p>
<div class="bs-docs-example">
<span class="smallipop sampleElement" data-smallipop-preferred-position="right" title="I prefer the position on the right, even when my siblings stay on top!">
Hover me!
</span>
</div>
<pre class="prettyprint linenums">
<span class="smallipop" data-smallipop-preferred-position="right" title="Some text">
Hover me!
</span></pre>
<table class="options" summary="Options for the jQuery smallipop plugin">
<tr>
<th>Key</th>
<th>Default value</th>
<th>Description</th>
</tr>
<tr>
<td>autoscrollPadding</td>
<td>200</td>
<td>Visible window margin in pixels in which the tour feature tries to stay in, when showing the next or previous step in a tour.</td>
</tr>
<tr>
<td>funcEase</td>
<td>easeInOutQuad</td>
<td>Easing function for the animations.</td>
</tr>
<tr>
<td>handleInputs</td>
<td>true</td>
<td>
Enables the focus and blur events on tags like <i>input, textarea, select</i> and disables the hide on click.
</td>
</tr>
<tr>
<td>hideDelay</td>
<td>500</td>
<td>Time before popup will be hidden.</td>
</tr>
<tr>
<td>hideOnPopupClick</td>
<td>true</td>
<td>Hide smallipop when it is clicked.</td>
</tr>
<tr>
<td>hideOnTriggerClick</td>
<td>true</td>
<td>Hide smallipop when the trigger is clicked.</td>
</tr>
<tr>
<td>hideTrigger</td>
<td>false</td>
<td>Hide the trigger when the popup is shown.</td>
</tr>
<tr>
<td>infoClass</td>
<td>smallipopHint</td>
<td>Class in an element which contains markup content for the popup.</td>
</tr>
<tr>
<td>invertAnimation</td>
<td>false</td>
<td>
The popup will move up when an element is hovered and further up when fading out. If you set this
to true, the popup will move down when fading out.
</td>
</tr>
<tr>
<td>onAfterHide</td>
<td>null</td>
<td>Callback after smallipop is hidden</td>
</tr>
<tr>
<td>onAfterShow</td>
<td>null</td>
<td>Callback after smallipop is shown</td>
</tr>
<tr>
<td>onBeforeHide</td>
<td>null</td>
<td>Callback before smallipop is hidden</td>
</tr>
<tr>
<td>onBeforeShow</td>
<td>null</td>
<td>Callback before smallipop is shown</td>
</tr>
<tr>
<td>onTourClose</td>
<td>null</td>
<td>Callback when the tour has finished</td>
</tr>
<tr>
<td>onTourNext</td>
<td>null</td>
<td>Callback when the next tour element is shown</td>
</tr>
<tr>
<td>onTourPrev</td>
<td>null</td>
<td>Callback when the previous tour element is shown</td>
</tr>
<tr>
<td>popupAnimationSpeed</td>
<td>200</td>
<td>How much time the popup needs to reach it's final animation position and opacity in milliseconds.</td>
</tr>
<tr>
<td>popupDelay</td>
<td>100</td>
<td>How much time in milliseconds you have to hover on an element before the popups shows up.</td>
</tr>
<tr>
<td>popupDistance</td>
<td>20</td>
<td>Vertical distance when the popup appears and disappears.</td>
</tr>
<tr>
<td>popupOffset</td>
<td>31</td>
<td>Horizontal offset for the popup from the center of the trigger when the popup is aligned left or right.</td>
</tr>
<tr>
<td>popupYOffset</td>
<td>0</td>
<td>Vertical offset for the popup.</td>
</tr>
<tr>
<td>preferredPosition</td>
<td>'top'</td>
<td>Use "top" or "bottom" for the default layout and "left" or "right" when the popup should stay horizontal.</td>
</tr>
<tr>
<td>theme</td>
<td>default</td>
<td><i>black</i>, <i>blue</i>, <i>white</i> and a default theme are included in the css file.</td>
</tr>
<tr>
<td>touchSupport</td>
<td>true</td>
<td>
When touch events are supported hover events are disabled and smallipop will activated by touching a trigger.<br/>
A second touch will trigger the default action on the trigger. I.e. open a link.
The touch feature detection currently requires the modernizr library.
</td>
</tr>
<tr>
<td>tourHighlight</td>
<td>false</td>
<td>
Will display an transparent overlay to highlight the tour triggers.
</td>
</tr>
<tr>
<td>tourHighlightColor</td>
<td>'#222'</td>
<td>
The overlay color.
</td>
</tr>
<tr>
<td>tourHightlightFadeDuration</td>
<td>200</td>
<td>
The duration for the overlay fade effect.
</td>
</tr>
<tr>
<td>tourHighlightOpacity</td>
<td>.5</td>
<td>
The opacity of the overlay.
</td>
</tr>
<tr>
<td>tourHighlightZIndex</td>
<td>9997</td>
<td>
The z-index which will be used for the overlay and the highlighted trigger.
</td>
</tr>
<tr>
<td>triggerAnimationSpeed</td>
<td>150</td>
<td>How fast the trigger fades in and out when hideTrigger is set.</td>
</tr>
<tr>
<td>triggerOnClick</td>
<td>false</td>
<td>
Disables the hover event for triggers and smallipop will be activated by clicking the trigger.<br/>
A second click will trigger the default action on the trigger. I.e. open a link.
</td>
</tr>
<tr>
<td>windowPadding</td>
<td>30</td>
<td>Minimal distance to the window borders the smallipop should keep when computing it's orientation.</td>
</tr>
</table>
<hr id="methods"/>
<div>
<h3>Callable methods</h3>
<p>
You can show and hide smallipop via manual calls. Only the first element found in the selectors result will be triggered.
</p>
<pre class="prettyprint">$('.myTrigger').smallipop('show');</pre>
<pre class="prettyprint">$('.myTrigger').smallipop('hide');</pre>
<p>
Removing smallipop from elements is also possible.
</p>
<pre class="prettyprint">$('.myTriggers').smallipop('destroy');</pre>
<p>
Update the content of a smallipop while it's visible.
</p>
<pre class="prettyprint">$('.myTrigger').smallipop('update', 'Test');</pre>
</div>
<hr id="installation"/>
<div>
<h3>Installation</h3>
<h6>Prequisites</h6>
<ul>
<li>
<b><a href="http://www.jquery.com" target="_blank" title="jQuery library">jQuery</a></b><br/>
1.5.2 or better
</li>
<li>
<b><a href="http://www.modernizr.com" target="_blank" title="Modernizr library">Modernizr</a></b><br/>
This library tests the browser for feature support and adds classes to the body tag.<br/>
We use this for css fallbacks in our themes.<br/>
Required features:
<i>rgba, cssanimations, cssgradients, csstransitions, touch, cssclasses</i>
</li>
</ul>
<p>
Both are also provided in a current version in the <i>lib</i> folder.
</p>
<br/>
<h6>Required files</h6>
<p>1. Copy <i>lib/jquery-smallipop.js</i> to your javascript folder.</p>
<p>2. Copy <i>lib/jquery-x.x.x.min.js</i> to your javascript folder if you don't use jQuery already.</p>
<p>3. Copy <i>lib/modernizr-x.x.x.js</i> to your javascript folder if you don't use modernizr already.</p>
<p>4. Copy <i>css/jquery-smallipop.css</i> to your css folder.</p>
<p>5. Copy <i>css/animate.min.css</i> to your css folder if you want to use the advanced css based animations.</p>
<p>There is a minified version of the smallipop javascript for production in the lib folder too.</p>
<br/>
<h6>Modify your html header</h6>
<p>Add these lines to the header of your html file and replace x.x.x with the correct versions</p>
<pre class="prettyprint linenums">
<link rel="stylesheet" href="css/jquery-smallipop.css" type="text/css" media="all" title="Screen"/>
<script type="text/javascript" src="lib/jquery-x.x.x.min.js"></script>
<script type="text/javascript" src="lib/modernizr-x.x.x.min.js"></script>
<script type="text/javascript" src="lib/jquery-smallipop.js"></script></pre>
</div>
<hr id="features"/>
<div class="row">
<div class="column size2of3">
<h4>Features</h4>
<ul>
<li>
<b>Small</b><br/>
Only ~ 12KB minified and even less when gziped by your server.
</li>
<li>
<b>Pure css</b><br/>
No images but fallbacks for older browsers.
</li>
<li>
<b>Compatibility</b><br/>
smallipop has been tested with IE7-9, Chrome, Safari 4+,<br/>
Opera and Firefox 4+
</li>
<li>
<b>Custom themes</b><br/>
For different use cases.
</li>
<li>
<b>Free positioning</b><br/>
The popup code will be added to the document root so the<br/>
position won't be affected by your layout.
</li>
<li>
<b>Automatic orientation</b><br/>
The popup will try to stay in the visible area of the screen,<br/>
even when scrolling or at the edges.
</li>
<li>
<b>Only a single popup element</b><br/>
Some plugins create a hidden popup for each trigger.
</li>
<li>
<b>Custom options for each trigger</b><br/>
You can have 20 different popups with 20 different themes<br/>
on one page if you like.
</li>
<li>
Licensed under the <a href="http://www.opensource.org/licenses/mit-license.php" title="MIT licence">MIT</a> license.
</li>
</ul>
<br/>