From 8d2f14d8d0bfef3b472be7b7770177fad26d5068 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 8 Sep 2011 19:13:08 -0700 Subject: [PATCH] tabssss --- docs/assets/js/bootstrap-tabs.js | 35 +++++++++++++++++ docs/javascript.html | 66 ++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 docs/assets/js/bootstrap-tabs.js diff --git a/docs/assets/js/bootstrap-tabs.js b/docs/assets/js/bootstrap-tabs.js new file mode 100644 index 0000000000..55fdc7e08d --- /dev/null +++ b/docs/assets/js/bootstrap-tabs.js @@ -0,0 +1,35 @@ +(function( $ ){ + + function activate ( element, container ) { + container.find('.active').removeClass('active') + element.addClass('active') + } + + function tab( e ) { + debugger + var $this = $(this) + , href = $this.attr('href') + + if (/^#/.test(href)) { + e.preventDefault() + + if ($this.hasClass('active')) { + return + } + + activate($this, $ul) + activate($(href), $content) + } + } + + + /* TABS PLUGIN DEFINITION + * ====================== */ + + $.fn.tabs = function ( content ) { + return this.each(function () { + $(this).delegate('> li > a', 'click', tab) + }) + } + +})( jQuery || ender ) \ No newline at end of file diff --git a/docs/javascript.html b/docs/javascript.html index 8765b57708..5ece999ec7 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -233,6 +233,72 @@ $('#modal-content').modal({ + + +
+ +
+
+

This plugin is for adding simple dynamic tab functionality.

+ Download +
+
+

Using boostrap-tabs.js

+
$('#topbar').dropdown()
+

Method

+

$().dropdown

+

+ Activates menus for given topbar navigation. +

+

Demo

+ + +
+
+
+