aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-07-01 21:30:12 -0700
committerJacob Thornton <[email protected]>2011-07-01 21:30:12 -0700
commit8245a7087eac2e0725f2546d7bac9e68de94f58e (patch)
tree9351f60f1b101c58e5cd4ab67f3673f9cba1eb4d /docs
parentbe3a57a692097a23c49062d50bfbcd2af652f940 (diff)
downloadbootstrap-8245a7087eac2e0725f2546d7bac9e68de94f58e.tar.xz
bootstrap-8245a7087eac2e0725f2546d7bac9e68de94f58e.zip
add twipsies...
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/js/application.js44
-rw-r--r--docs/index.html33
2 files changed, 75 insertions, 2 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index 8a74c2eb3..8f54c9969 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -34,7 +34,7 @@ $(document).ready(function(){
$(this).parents('.add-on').removeClass('active');
}
});
-
+
// Disable certain links in docs
$('ul.tabs a, ul.pills a, .pagination a').click(function(e) {
e.preventDefault();
@@ -84,4 +84,46 @@ $(document).ready(function(){
processScroll();
$window.scroll(processScroll);
+
+ // POSITION TWIPSIES
+ // =================
+ $('.twipsies.well a').each(function () {
+ var type = this.title
+ , $anchor = $(this)
+ , $twipsy = $('.twipsy.' + type)
+
+ , twipsy = {
+ width: $twipsy.width() + 10
+ , height: $twipsy.height() + 10
+ }
+
+ , anchor = {
+ position: $anchor.position()
+ , width: $anchor.width()
+ , height: $anchor.height()
+ }
+
+ , offset = {
+ above: {
+ top: anchor.position.top - twipsy.height
+ , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2)
+ }
+ , below: {
+ top: anchor.position.top + anchor.height
+ , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2)
+ }
+ , left: {
+ top: anchor.position.top + (anchor.height/2) - (twipsy.height/2)
+ , left: anchor.position.left - twipsy.width - 5
+ }
+ , right: {
+ top: anchor.position.top + (anchor.height/2) - (twipsy.height/2)
+ , left: anchor.position.left + anchor.width + 5
+ }
+ }
+
+ $twipsy.css(offset[type])
+
+ });
+
}); \ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index d1b924181..ea6bd178b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -265,8 +265,10 @@
<h6>h6. Heading 6</h6>
</div>
<div class="span6 columns">
- <h3>Example paragraph (body text)</h3>
+ <h3>Example paragraph</h3>
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
+ <h1>Example heading<small>Has sub-heading...</small></h1>
+ <p>You can also add subheadings with the <code>&lt;strong&gt;</code> and <code>&lt;em&gt;</code></p>
</div>
</div>
@@ -1080,6 +1082,35 @@
</div>
</div>
</div>
+ <div class="row">
+ <div class="span4 columns">
+ <h2>Tool Tips</h2>
+ <p>Twipsies are super useful for aiding a confused user and pointing them in the right direction.</p>
+ </div>
+ <div class="span12 columns">
+ <div class="twipsies well muted">
+ <div style="position: relative">
+Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. <a href="#" title="right">Voluptasdicta</a> eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt <a href="#" title="left">sed</a> dicta quae accusantium fugit voluptas nemo voluptas voluptatem <a href="#" title="above">rem</a> quae aut veritatis quasi quae.
+ <div class="twipsy below">
+ <div class="twipsy-arrow"></div>
+ <div class="twipsy-inner">below!</div>
+ </div>
+ <div class="twipsy right">
+ <div class="twipsy-arrow"></div>
+ <div class="twipsy-inner">right!</div>
+ </div>
+ <div class="twipsy left">
+ <div class="twipsy-arrow"></div>
+ <div class="twipsy-inner">left!</div>
+ </div>
+ <div class="twipsy above">
+ <div class="twipsy-arrow"></div>
+ <div class="twipsy-inner">above!</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</section>