diff options
| author | Jacob Thornton <[email protected]> | 2011-09-08 19:13:08 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-09-08 19:13:08 -0700 |
| commit | 8d2f14d8d0bfef3b472be7b7770177fad26d5068 (patch) | |
| tree | f150dd2f69542b5a15545a6f0d74890a4957f223 /docs/assets | |
| parent | fb8987148aeae4b9aa2b4c28fa3ad5346b8c56b1 (diff) | |
| download | bootstrap-8d2f14d8d0bfef3b472be7b7770177fad26d5068.tar.xz bootstrap-8d2f14d8d0bfef3b472be7b7770177fad26d5068.zip | |
tabssss
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/js/bootstrap-tabs.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/assets/js/bootstrap-tabs.js b/docs/assets/js/bootstrap-tabs.js new file mode 100644 index 000000000..55fdc7e08 --- /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 |
