-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
592 lines (538 loc) · 28.5 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BeautyTips Demo Page</title>
<meta name="author" content="Jeff Robbins">
<!-- STUFF YOU NEED FOR BEAUTYTIPS -->
<script src="libs/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="libs/jquery.hoverIntent.minified.js" type="text/javascript" charset="utf-8"></script>
<!--[if lt IE 9]>
<script src="libs/jquery.bgiframe.min.js" type="text/javascript" charset="utf-8"></script>
<script src="libs/excanvas.compiled.js" type="text/javascript" charset="utf-8"></script>
<![endif]-->
<script src="jquery.bt.min.js" type="text/javascript" charset="utf-8"></script>
<!-- /STUFF -->
<!-- cool easing stuff for animations -->
<script src="libs/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
<!-- /easing -->
<!-- just for demo -->
<script src="demo/demo.js" type="text/javascript" charset="utf-8"></script>
<link href="demo/demo.css" rel="stylesheet" type="text/css">
<!--[if IE]><link href="demo/demo-ie-fix.css" rel="stylesheet" type="text/css"><![endif]-->
<!-- /demo stuff -->
</head>
<body>
<div id="page">
<div id="intro">
<h1>BeautyTips Demo</h1>
<h2>Usage</h2>
<p>The function can be called in a number of ways.<br>
<code>$(selector).bt();</code><br>
<code>$(selector).bt('Content text');</code><br>
<code>$(selector).bt('Content text', {option1: value, option2: value});</code><br>
<code>$(selector).bt({option1: value, option2: value});</code></p>
<h2>Examples</h2>
<p><small>Note: html and javascript textareas are live. Feel free to experiment with the code and see how BeautyTips are affected.</small></p>
</div><!-- /#intro -->
<div class="examples">
<div class="example" id="no-options"><h3>No options</h3>
<div id="example1" class="target" title="The content of this tooltip is provided by the 'title' attribute of the target element.">hover </div>
<div class="desc">
<p>This is the simplest example. No arguments are sent and the default settings
are used to create a tip which appears on the side with the most space.</p>
<div class="source">
<div class="js">$('#example1').bt();</div>
</div></div>
</div>
<div class="example" id="content-from-argument">
<h3>Content from argument</h3>
<div id="example2" class="target">click </div>
<div class="desc">
<p>Tip appears above the element when it is clicked. The contents of tip is provided when creating the tip.</p>
<div class="source">
<div class="js">$('#example2').bt('Contents of the tip is provided in the .bt() call', {trigger: 'click', positions: 'top'});</div>
</div></div>
</div>
<div class="example" id="content-from-attribute">
<h3>Content from attribute</h3>
<div class="ie-fix"><a id="example3" href="http://www.lullabot.com" title="link to Lullabot" class="target">hover</a></div>
<div class="desc">
<p>This example uses the contentSelector attribute to determine where the content comes from. In this case the selector is <code>$(this).attr('href')</code> and the content is the href attribute of the hovered link. Other options define a red balloon with bold white text. The box will be a variable width up to 400px ("width: 'auto' in cssStyles makes text box shrink-to-fit) with rounded corners. The script will try to position the box to the left, then to the right, and finally it will place it on the bottom if it does not fit elsewhere.</p>
<div class="source">
<div class="js">$('#example3').bt({
contentSelector: "$(this).attr('href')",
fill: 'red',
cssStyles: {color: 'white', fontWeight: 'bold'},
shrinkToFit: true,
padding: 10,
cornerRadius: 10,
spikeLength: 15,
spikeGirth: 5,
positions: ['left', 'right', 'bottom']
});</div>
</div></div>
</div>
<div class="example" id="pre-post-functions">
<h3>Pre/post functions</h3>
<div class="ie-fix"><div id="example4" title="This example triggers functions before the tip appears and after the tip is hidden." class="target">hover</div></div>
<div class="desc">
<p>There are four different functions which can be triggered at different points in the lifetime of a beautyTip: preShow, postShow, preHide, and postHide.</p>
<p>In this example, a function is triggered to change the content of the
target element before the tip is shown. After the tip is hidden, another
function changes the content back. <code>this</code> in these function refers to the target element. These functions could be used for just about anything.</p>
<div class="source">
<div class="js">$('#example4').bt({
preShow: function() {
$(this).data('origContent', $(this).html());
$(this).html('hovering active');
},
postHide: function() {
$(this).html($(this).data('origContent'));
}
});</div></div>
</div>
</div>
<div class="example" id="css-tricks">
<h3>CSS tricks</h3>
<style type="text/css">.example-5-active {
background-color: #666;
color: #FFF;
}
.example-5-tip {
font-family: Georgia, "Times New Roman", Times, serif;
color: #660000;
}</style>
<div class="ie-fix"><div id="example5" title="The target element gets a class added when it is active. The BeautyTip's class is also configurable." class="target">hover</div></div>
<div class="desc">
<p>When the BeautyTip is active, an additional class is added to the target
element. This class, called "activeClass", can be defined when calling
the bt() function. Additionally, each BeautyTip popup has a wrapper div
which surrounds its content. The class on this div is also definable.</p>
<p>Note that the BeautyTip "balloon" itself is drawn as a bitmap using canvas
methods and functions similar to an <img> element, so it can not be affected
by CSS. There are many options for changing this element using JavaScript
options though.</p>
<div class="source">
<div class="js">$('#example5').bt({
activeClass: 'example-5-active',
cssClass: 'example-5-tip'
});</div>
</div>
</div>
</div>
<div class="example" id="customizing-balloon">
<h3>Customizing the balloon</h3>
<div class="ie-fix"><div id="example6" title="This popup balloon is very configurable." class="target">hover</div></div>
<div class="desc">
<p>The BeautyTip balloons are drawn dynamically and highly configurable.
Customizable attributes include background color and opacity, stroke width
and color, spike length and width, corner radius, and more. For convenience,
style attributes such as font color and weight can be sent through the
JavaScript call as well.</p>
<div class="source">
<div class="js">$('#example6').bt({
padding: 20,
width: 100,
spikeLength: 40,
spikeGirth: 40,
cornerRadius: 40,
fill: 'rgba(0, 0, 0, .8)',
strokeWidth: 3,
strokeStyle: '#CC0',
cssStyles: {color: '#FFF', fontWeight: 'bold'}
});</div>
</div>
</div>
</div>
<div class="example" id="image-content">
<h3>Image content</h3>
<div class="ie-fix"><div type="text" id="example16" class="target">hover</div></div>
<div class="desc">
<p>Images can be loaded into the BeautyTip. You should, however, add width and height attributes (or use CSS for this) so that the browser will know what size to "save space for" as the image loads.</p>
<p>This example also uses some special triggers so that the tip appears on mouseover, but disappears using click. BeautyTips' default clickAnywhereToClose option also allows the user to click anywhere in the document (outside of the tip) in order to close it. This can be disabled either globally or per tip.</p>
<div class="source">
<div class="js">$('#example16').bt('<img src="demo/lullabot.png" width="200" height="197" />',
{
width: 200,
fill: 'white',
cornerRadius: 20,
padding: 20,
strokeWidth: 1,
trigger: ['mouseover', 'click']
});</div>
</div>
</div>
</div>
<div class="example" id="customizing-triggers">
<h3>Customizing triggers</h3>
<div class="ie-fix"><input type="text" id="example7" title="This tip is triggered to appear when the field gets focus and disappear when the field loses focus (i.e. gets blurred)." value="focus" class="alt-target" /></div>
<div class="desc">
<p>The trigger is what causes the tip to appear/disappear. The default option
is 'hover', which will trigger the tip when the mouse hovers over an element.
If the <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html">hoverintent</a> plugin
is installed (as on this page), that will become the default trigger and
there will be slight (but configurable) delay before the tip appears.</p>
<p>In this example, the trigger events for this textfield are 'focus' and
'blur'. This means that the tip will get triggered even if the user uses
the tab key to enter/leave this form field.</p>
<div class="source">
<div class="js">$('#example7').bt({
trigger: ['focus', 'blur'],
positions: ['right']
});</div>
</div>
</div>
</div>
<div class="example" id="customizing-triggers-2">
<h3>Customizing triggers 2</h3>
<div class="ie-fix"><input type="text" id="example8" title="The tip doesn't appear until the user actually types text into the field." value="edit me" class="alt-target" /></div>
<div class="desc">
<p>In this example, 'keyup' triggers the display of the tip while 'blur'
removes it. This means that the tip won't appear until the user actually
changes the field (using the keyboard).</p>
<p>The full list of trigger events are: <code>blur, focus, load, resize,
scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover,
mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress,
keyup,</code> and <code>error</code>. However not all events are available for all elements (see: <a href="http://docs.jquery.com/Events">events documentation</a>). </p>
<div class="source">
<div class="js">$('#example8').bt({
trigger: ['keyup', 'blur'],
positions: ['right']
});</div>
</div>
</div>
</div>
<div class="example" id="scripting">
<h3>Scripting on/off</h3>
<div class="ie-fix"><div type="text" id="example15" class="target">no trigger</div></div>
<div class="desc">
<p id="example-15-content">This tip is initiated with a trigger of 'none'. All of the options are set, but turn on/off of the tip isn't bound to any event. We can, however, turn on and off the tip using Javascript. <a href="javascript:void($('#example15').btOn());">$('#example15').btOn();</a> turns it on. <a href="javascript:void($('#example15').btOff());">$('#example15').btOff();</a> turns it off. These btOn() and btOff() functions are available for all elements which have been set up using the bt() function. So, we can programmatically turn on any BeautyTip on the page. <a href="javascript:void($('#example8').btOn());">Click here</a> to turn on the tip from the previous example.</p>
<div class="source">
<div class="js">$('#example15').bt({
trigger: 'none',
contentSelector: "$('#example-15-content')",
width: 400
});</div>
</div>
</div>
</div>
<div class="example" id="hoverintent">
<h3>HoverIntent</h3>
<div class="ie-fix"><div type="text" id="example9" title="A long <code>interval</code> value ensures that the user <em>intends</em> to be hovering. A long <code>timeout</code> value ensures that the user <em>intends not</em> to be hovering. " class="target">hover and wait</div></div>
<div class="desc">
<p>The <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html">hoverIntent</a> plugin allows control over how and when the mouseOver
event gets triggered when a user hovers over an element. In this example,
the <code>interval</code> has been cranked up to 1 second, so the user
needs to hover for almost a second before the tip appears. The timeout
has been raised to 2 seconds so the tip will remain visible for that long
before disappearing.</p>
<div class="source">
<div class="js">$('#example9').bt({
hoverIntentOpts: {
interval: 1000,
timeout: 2000
}
});</div>
</div>
</div>
</div>
<div class="example" id="ajax-content">
<h3>Ajax content</h3>
<div class="ie-fix"><div type="text" id="example10" class="target">hover</div></div>
<div class="desc">
<p>Content comes from the <code>#content</code> div of the html page: <a href="demo/demo-ajax.html">demo-ajax.html</a>. Note: this isn't really ajax, it's actually ahah (asynchronous HTML and HTTP). Ahah is much easier to deal with than ajax (which technically uses XML).</p>
<div class="source">
<div class="js">$('#example10').bt({
ajaxPath: 'demo/demo-ajax.html div#content'
});</div>
</div>
</div>
</div>
<div class="example" id="ajax-error">
<h3>Ajax error</h3>
<div class="ie-fix"><div type="text" id="example11" class="target">hover</div></div>
<div class="desc">
<p>Requested ajax page doesn't exist. This example uses a custom error message. This example may not work correctly if you have opened the file locally (without a web server).</p>
<div class="source">
<div class="js">$('#example11').bt({
ajaxPath: 'foo.html',
ajaxError: "<strong>Egads!</strong> There was a problem getting this content. Here's what we know: <em>%error</em>."
});</div>
</div>
</div>
</div>
<div class="example" id="ajax-content">
<h3>Ajax dynamic path</h3>
<div class="ie-fix"><a href="demo/demo-ajax.html" id="example18" class="target">hover</a></div>
<div class="desc">
<p>AjaxPath is being read from the 'href' value of the link. This is accomplished by defining the ajaxPath as an array. The first value of the array is the jQuery code to find the path value (in this case <code>"$(this).attr('href')"</code>). The optional second value of the array is the content selector within the loaded page (in this case <code>'div#content'</code>). This is a handy way of adding "preview" BeautyTips to a bunch of links on a page.</p>
<div class="source">
<div class="js">$('#example18').bt({
ajaxPath: ["$(this).attr('href')", 'div#content']
});</div>
</div>
</div>
</div>
<div class="example" id="big-big-big">
<h3>Big Big Big</h3>
<div class="ie-fix"><div type="text" id="example14" class="target">click</div></div>
<div class="desc">
<p>A popup with <em>lots</em> of content. This popup gets populated from a div which immediately follows this text in the html source, but gets hidden by the same script which defines the BeautyTip. This is a good way to provide degradable help which appears for users with JavaScript disabled.</p>
<div id="example-14-content">
<h3>A really big popup</h3>
<p>This tip is chock-full of content. It is intended to show how BeautyTips deals with fitting large content onto the page. The rest of this content is gibberish. Seamlessly empower dynamic communities with clicks-and-mortar testing procedures. Globally scale front-end ideas through next-generation web services. Holisticly harness business data via resource maximizing meta-services.</p>
<p>Assertively pontificate extensible ROI via end-to-end manufactured products. Compellingly scale resource sucking human capital rather than visionary infomediaries. Quickly evolve robust data with intuitive vortals.</p>
<p>Authoritatively revolutionize scalable solutions without e-business intellectual capital. Compellingly restore web-enabled potentialities through tactical information. Phosfluorescently disintermediate stand-alone convergence for team building sources.</p>
<p>Interactively leverage existing sticky products rather than orthogonal expertise. Enthusiastically innovate worldwide process improvements whereas proactive markets. Appropriately evisculate B2B niche markets before vertical content.</p>
<p>Quickly reinvent state of the art potentialities after process-centric experiences. Completely e-enable sticky technology whereas impactful ideas. Dynamically underwhelm holistic "outside the box" thinking whereas effective testing procedures.</p>
<p>Synergistically plagiarize cost effective leadership and low-risk high-yield e-commerce. Credibly maintain market positioning strategic theme areas and client-based benefits. Globally disseminate clicks-and-mortar infomediaries for premium e-tailers.</p>
<p>Professionally reconceptualize interdependent content through error-free innovation. Collaboratively provide access to one-to-one strategic theme areas without magnetic web-readiness. Appropriately negotiate strategic opportunities without timely alignments.</p>
<p>Continually engineer premier best practices after plug-and-play communities. Monotonectally drive installed base users whereas wireless products.</p>
</div>
<div class="source">
<div class="js">$('#example-14-content').hide();
$('#example14').bt({
trigger: 'click',
contentSelector: "$('#example-14-content').html()", /*get text of inner content of hidden div*/
width: 500,
fill: '#00FF4E',
strokeWidth: 0, /*no stroke*/
spikeLength: 40,
spikeGirth: 10,
padding: 20,
cornerRadius: 15,
cssStyles: {
fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif',
fontSize: '13px'
}
});</div>
</div>
</div>
</div>
<div class="example" id="simple-animation">
<h3>Simple Animation</h3>
<div class="ie-fix"><div type="text" id="example21" class="target" title="Animations are a bit complicated, but very flexible.">hover</div></div>
<div class="desc">
<p>Animation can be added by creating a custom <code>showTip</code> or <code>hideTip</code> function. Each function gets an argument of <code>box</code>, which is a reference to the <em>.bt-wrapper</em> div around the tip. The <code>box</code> element is set to <em>display: none</em>, so your code will presumably use animation methods to show it. The <em>this</em> variable in each function refers to the target (hovered, clicked, focused, etc) element. The <code>hideTip</code> function gets a second argument of <code>callback</code>. This is a reference to the cleanup function and MUST be triggered at the end of the <code>hideTip</code> animation.</p>
<p><em>It appears that this animation doesn't work correctly in Internet Explorer. This is most likely a bug somewhere between jQuery and Explorer Canvas. It does degrade to non-animated functionality though. Ironically, the complex animation example below works better in IE.</em></p>
<div class="source">
<div class="js">$('#example21').bt({
showTip: function(box){
$(box).fadeIn(500);
},
hideTip: function(box, callback){
$(box).animate({opacity: 0}, 500, callback);
},
shrinkToFit: true,
hoverIntentOpts: {
interval: 0,
timeout: 0
}
});</div>
</div>
</div>
</div>
<div class="example" id="complex-animation">
<h3>Complex Animation</h3>
<div class="ie-fix"><div type="text" id="example20" class="target" title="Animations are a bit complicated, but very flexible.">hover</div></div>
<div class="desc">
<p>At the time that <code>showTip</code> is triggered, the tip is hidden (display: none) but completely built, positioned, and ready to go. If we want to animate its position, size, or other attributes, we need to create variables representing the current attributes so that we know where to end our animation. In this example, we're animating the size of the canvas (the bitmap drawing of the tip) as well as it's left and top position so that it remains centered as its size animates.</p>
<p>In order to keep the animation efficient, the content (the text) is hidden during the animation and appears after the animation is finished.</p>
<p><code>hideTip</code> works in reverse. The <em>callback</em> gets called at the end of the animation to cleanup the box, removing it from the DOM and getting things ready for the next time the tip is triggered.</p>
<div class="source">
<div class="js">$('#example20').bt({
showTip: function(box){
var $content = $('.bt-content', box).hide(); /* hide the content until after the animation */
var $canvas = $('canvas', box).hide(); /* hide the canvas for a moment */
var origWidth = $canvas[0].width; /* jQuery's .width() doesn't work on canvas element */
var origHeight = $canvas[0].height;
$(box).show(); /* show the wrapper, however elements inside (canvas, content) are now hidden */
$canvas
.css({width: origWidth * .5, height: origHeight * .5, left: origWidth * .25, top: origHeight * .25, opacity: .1})
.show()
.animate({width: origWidth, height: origHeight, left: 0, top: 0, opacity: 1}, 400, 'easeOutBounce',
function(){$content.show()} /* show the content when animation is done */
);
},
/* when using hideTip, do NOT forget 'callback' at end of animation */
hideTip: function(box, callback){
var $content = $('.bt-content', box).hide();
var $canvas = $('canvas', box);
var origWidth = $canvas[0].width;
var origHeight = $canvas[0].height;
$canvas
.animate({width: origWidth * .5, height: origHeight * .5, left: origWidth * .25, top: origHeight * .25, opacity: 0}, 400, 'swing', callback); /* callback */
},
/* other options */
shrinkToFit: true,
hoverIntentOpts: {
interval: 0,
timeout: 0
}
});</div>
</div>
</div>
</div>
<div class="example" id="shadows">
<h3>Drop Shadows</h3>
<div id="example19" class="target">hover</div>
<div class="desc">
<p>Drop shadows are part of the canvas spec, but they are not implemented by many browsers. Drop shadows currently only work in Safari and Firefox 3.5 and higher. Eventually I would like to create canvas-drawn drop shadows that should work in all browsers, but for the time being, keep in mind that these won't work in all browsers. However, for these non-drop-shadow browsers, you can define "no shadow options" (noShadowOpts) to define how the tip should be displayed if shadows aren't supported.</p>
<div class="source">
<div class="js">$('#example19').bt('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.',
{
fill: '#FFF',
cornerRadius: 10,
strokeWidth: 0,
shadow: true,
shadowOffsetX: 3,
shadowOffsetY: 3,
shadowBlur: 8,
shadowColor: 'rgba(0,0,0,.9)',
shadowOverlap: false,
noShadowOpts: {strokeStyle: '#999', strokeWidth: 2},
positions: ['left', 'top']
});</div>
</div></div>
</div>
<div class="example" id="netflix">
<h3>Netflix style</h3>
<div class="ie-fix"><div type="text" id="example13" class="target">hover</div></div>
<div class="desc">
<p><a href="http://www.netflix.com">Netflix</a>-style big descriptive popups using ajax.</p>
<div class="source">
<div class="js">$('#example13').bt({
ajaxPath: 'demo/netflix.html',
centerPointY: .1,
positions: ['right', 'left'],
padding: 0,
width: 256,
spikeGirth: 60,
spikeLength: 50,
cornerRadius: 10,
fill: '#FFF',
strokeStyle: '#B9090B',
shadow: true,
shadowBlur: 12,
shadowOffsetX: 0,
shadowOffsetY: 5,
hoverIntentOpts: {interval: 800, timeout: 0},
cssStyles: {
fontSize: '12px',
fontFamily: 'arial,helvetica,sans-serif'
}
});</div>
</div>
</div>
</div>
<div class="example" id="google-maps">
<h3>Google Maps</h3>
<div class="ie-fix"><img src="demo/gmap-pin.png" alt="gmap-pin" title="" width="19" height="32" id="example17" class="alt-target" /></div>
<div class="desc">
<p>Google Maps balloons! Content is provided by a hidden div on the page. Note the use of centerPointX to adjust where the spike extends from. We're also using a close-box "x" image in the content which is a javascript link to close the tip.</p>
<div id="example-17-content" class="gmap">
<div class="gmap-title">Address:</div>
<div class="gmap-addr">
<div>123 Main St.</div>
<div>Seekonk, MA 02771</div>
</div>
<div class="gmap-bottom">
<div>Get directions: <a href="javascript:void(null);">To here</a> - <a href="javascript:void(null);">From here</a></div>
<div><a href="javascript:void(null);">Search nearby</a> - <a href="javascript:void(null);">Save to My Maps</a></div>
<div><a href="javascript:void(null);">Edit</a></div>
</div>
<a href="javascript:void($('#example17').btOff());"><img src="demo/close.gif" alt="close" width="12" height="12" class="gmap-close" /></a>
</div>
<div class="source">
<div class="js">$('#example-17-content').hide();
$('#example17').bt({
positions: 'top',
contentSelector: "$('#example-17-content')", /*hidden div*/
trigger: 'click',
width: 220,
centerPointX: .9,
spikeLength: 65,
spikeGirth: 40,
padding: 15,
cornerRadius: 25,
fill: '#FFF',
strokeStyle: '#ABABAB',
strokeWidth: 1
});</div>
</div>
</div>
</div>
<div class="example" id="facebook">
<h3>Facebook style</h3>
<div class="ie-fix"><div type="text" id="example12" class="target" title="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.">hover</div></div>
<div class="desc">
<p>Facebook-style.</p>
<div class="source">
<div class="js">$('#example12').bt({
fill: '#F7F7F7',
strokeStyle: '#B7B7B7',
spikeLength: 10,
spikeGirth: 10,
padding: 8,
cornerRadius: 0,
cssStyles: {
fontFamily: '"lucida grande",tahoma,verdana,arial,sans-serif',
fontSize: '11px'
}
});</div>
</div>
</div>
</div>
<div class="example" id="hulu">
<h3>Hulu style</h3>
<div class="ie-fix"><div type="text" id="hulu-target" class="target">hover</div></div>
<div id="hulu-content">
<b>BeautyTips:</b> Pretty Tooltips For jQuery<br />
Season 1, Ep. 1 (00:48)<br />
Air date: 05/20/2009 | Rated: TV-14 | ☆☆☆☆☆<br />
<hr />
Call them tooltips, talk bubbles, or help balloons, we're making them quick and pretty - without any graphics slicing or careful CSS layering.
</div>
<div class="desc">
<p><a href="http://www.hulu.com">Hulu</a> style. Use Safari or Firefox 3.5+ to get the full effect with the drop shadow.</p>
<div class="source">
<div class="js">$('#hulu-content').hide();
$('#hulu-target').bt({
contentSelector: "$('#hulu-content')",
positions: ['right', 'left'],
fill: '#F4F4F4',
strokeStyle: '#666666',
spikeLength: 20,
spikeGirth: 10,
width: 350,
overlap: 0,
centerPointY: 1,
cornerRadius: 0,
cssStyles: {
fontFamily: '"Lucida Grande",Helvetica,Arial,Verdana,sans-serif',
fontSize: '12px',
padding: '10px 14px'
},
shadow: true,
shadowColor: 'rgba(0,0,0,.5)',
shadowBlur: 8,
shadowOffsetX: 4,
shadowOffsetY: 4
});</div>
</div>
</div>
</div>
</div> <!-- /.examples -->
<div id="wrapup">
<h2>Options</h2>
<p>A full list of options can be found at the bottom of the <a href="jquery.bt.js" type="text/plain">jquery.bt.js</a> file itself. Scroll to the bottom of the file to see the list of options along with their default values and a short descriptions of what each one does.</p>
<p>These defaults can be overridden during each call to the $.bt() function (as in the examples above) or they can be overridden globally for all BeautyTips on the page. For instance, to change the ajax loading content for all BeautyTips on the page, you could insert the following code into your document's <head> (somewhere after <script src="jquery.bt.js"...):</p>
<blockquote><code><script language="JavaScript"><br/>
jQuery.bt.options.ajaxLoading = '<img src="/images/throbber.gif" width="40" height="40" />';<br />
jQuery.bt.options.closeWhenOthersOpen = true;<br />
</script></code></blockquote>
</div>
</body>
</html>