From 5f4e30ed1d33f83b0fad3afc9174e193e6c3fdf4 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Fri, 9 Sep 2011 22:47:49 -0700 Subject: move js plugins to root dir, begin writing tests, and change modal plugin to be more boss like --- docs/javascript.html | 128 ++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 62 deletions(-) (limited to 'docs/javascript.html') diff --git a/docs/javascript.html b/docs/javascript.html index 932bfc27e..7d1c6d6ca 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -16,12 +16,12 @@ - - - - - - + + + + + + @@ -45,11 +45,11 @@

Bootstrap JS

@@ -67,7 +67,7 @@

Our Modal plugin is a super slim take on the traditional modal js plugin! We took special care to include only the bare functionality that we require at twitter.

- Download + Download

Using bootstrap-modal

@@ -76,24 +76,25 @@
  • backdrop (boolean) - if true, it will include a modal-backdrop element.
  • closeOnEscape (boolean) - if true, it will close the modal when escape key is pressed.
  • -
  • content (string) - alternative way of supplying modal class with HTML content.

Methods

$().modal

-

Returns an instance of the modal class. Accepts an optional options object. If you want your modal to fade in and out, just add a .fade class to your .modal element (refer to the demo to see this in action).

+

Activates your content as a modal. Accepts an optional options object. If you want your modal to fade in and out, just add a .fade class to your .modal element (refer to the demo to see this in action).

 $('#modal-content').modal({
   closeOnEscape: true
 })
-

.toggle

-

Returns an instance of the modal class. Toggle the modal open state.

-
$('#modal-content').modal().toggle()
-

.open

-

Returns an instance of the modal class. Opens the modal.

-
$('#modal-content').modal().open()
-

.close

-

Returns an instance of the modal class. Closes the modal.

-
$('#modal-content').modal().close()
+

Events

+

Trigger events to make things happen!

+

modal:toggle

+

Toggle the modal open state.

+
$('#modal-content').trigger('modal:toggle')
+

modal:open

+

Opens the modal.

+
$('#modal-content').trigger('modal:open')
+

modal:close

+

Closes the modal.

+
$('#modal-content').trigger('modal:close')

Demo

@@ -115,13 +116,14 @@ $('#modal-content').modal({ -
-
- @@ -180,7 +144,7 @@ $('#modal-content').modal({

This plugin is for adding dropdowns to the bootstrap nav.

- Download + Download

Using boostrap-dropdown.js

@@ -246,7 +210,7 @@ $('#modal-content').modal({

This plugin adds quick, dynamic tab and pill functionality.

- Download + Download

Using boostrap-tabs.js

@@ -311,7 +275,7 @@ Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seita

Based on the excellent jQuery.tipsy plugin written by Jason Frame; twipsy is an updated version, which doesn't rely on images, uses css3 for animations, and data-attributes for title storage!

- Download + Download

Using bootstrap-twipsy.js

@@ -358,7 +322,7 @@ Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seita

The popover plugin provides a simple interface for adding popovers to your application. It extends the boostrap-twipsy.js plugin, so be sure to grab that file as well when including popovers in your project!

- Download + Download

Using boostrap-popover.js

@@ -393,6 +357,46 @@ Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seita
+ + + +
+ +
+
+

The alert plugin is a super tiny class for adding close functionality to alerts.

+ Download +
+
+

Using bootstrap-alert

+
$(".alert-message").alert()
+

Methods

+

$().alert

+

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

+

Demo

+
+ × +

Holy guacamole! Best check yo self, you’re not looking too good.

+
+
+ × +

Oh snap! You got an error! Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

+ +
+ +
+
+
+
\ No newline at end of file -- cgit v1.2.3