front-page new structure with module-gallery and content and footer logo-gallery
1 /* ========================================================================
2 * Bootstrap: tab.js v3.0.3
3 * http://getbootstrap.com/javascript/#tabs
4 * ========================================================================
5 * Copyright 2013 Twitter, Inc.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ======================================================================== */
21 +function ($) { "use strict";
23 // TAB CLASS DEFINITION
24 // ====================
26 var Tab = function (element) {
27 this.element = $(element)
30 Tab.prototype.show = function () {
31 var $this = this.element
32 var $ul = $this.closest('ul:not(.dropdown-menu)')
33 var selector = $this.data('target')
36 selector = $this.attr('href')
37 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
40 if ($this.parent('li').hasClass('active')) return
42 var previous = $ul.find('.active:last a')[0]
43 var e = $.Event('show.bs.tab', {
44 relatedTarget: previous
49 if (e.isDefaultPrevented()) return
51 var $target = $(selector)
53 this.activate($this.parent('li'), $ul)
54 this.activate($target, $target.parent(), function () {
57 , relatedTarget: previous
62 Tab.prototype.activate = function (element, container, callback) {
63 var $active = container.find('> .active')
64 var transition = callback
65 && $.support.transition
66 && $active.hasClass('fade')
70 .removeClass('active')
71 .find('> .dropdown-menu > .active')
72 .removeClass('active')
74 element.addClass('active')
77 element[0].offsetWidth // reflow for transition
78 element.addClass('in')
80 element.removeClass('fade')
83 if (element.parent('.dropdown-menu')) {
84 element.closest('li.dropdown').addClass('active')
87 callback && callback()
92 .one($.support.transition.end, next)
93 .emulateTransitionEnd(150) :
96 $active.removeClass('in')
100 // TAB PLUGIN DEFINITION
101 // =====================
105 $.fn.tab = function ( option ) {
106 return this.each(function () {
108 var data = $this.data('bs.tab')
110 if (!data) $this.data('bs.tab', (data = new Tab(this)))
111 if (typeof option == 'string') data[option]()
115 $.fn.tab.Constructor = Tab
121 $.fn.tab.noConflict = function () {
130 $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {