From: Jacob Thornton Date: Fri, 9 Sep 2011 02:13:08 +0000 (-0700) Subject: tabssss X-Git-Tag: v1.3.0~70^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d2f14d8d0bfef3b472be7b7770177fad26d5068;p=thirdparty%2Fbootstrap.git tabssss --- 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

+ + +
+
+
+