1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

revert all js stuff back to 1.4 :/

This commit is contained in:
Jacob Thornton
2011-11-20 18:19:50 -08:00
parent 4e6275d0fe
commit 0b1d5d9189
9 changed files with 543 additions and 304 deletions

15
js/bootstrap-tabs.js vendored
View File

@@ -1,5 +1,5 @@
/* ========================================================
* bootstrap-tabs.js v2.0.0
* bootstrap-tabs.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
!function( $ ){
"use strict"
function activate ( element, container ) {
container
.find('> .active')
@@ -39,6 +41,7 @@
, $ul = $this.closest('ul:not(.dropdown-menu)')
, href = $this.attr('href')
, previous
, $href
if ( /^#\w+/.test(href) ) {
e.preventDefault()
@@ -64,8 +67,14 @@
/* TABS/PILLS PLUGIN DEFINITION
* ============================ */
$(function () {
$('body').delegate('ul[data-tabs] > li > a, ul[data-pills] > li > a', 'click', tab)
$.fn.tabs = $.fn.pills = function ( selector ) {
return this.each(function () {
$(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
})
}
$(document).ready(function () {
$('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
})
}( window.jQuery || window.ender );