aboutsummaryrefslogtreecommitdiffstats
path: root/zurb-F5-basic/static/js/foundation/foundation.tab.js
diff options
context:
space:
mode:
authorPeter Fraenkel <pnf@podsnap.com>2014-08-21 12:53:41 -0400
committerPeter Fraenkel <pnf@podsnap.com>2014-08-21 12:53:41 -0400
commitcfa5f40283668540cda45794200809640f251acd (patch)
treecf2bd8ffbea3ed4c01b5690ffd8ae2702976b583 /zurb-F5-basic/static/js/foundation/foundation.tab.js
parent1cd742a84a81f135234be021cf4fe7b8ff2c13ff (diff)
parenta928687830876af8c919606bae47195af65bc82d (diff)
downloadpelican-themes-cfa5f40283668540cda45794200809640f251acd.tar.gz
Merge remote-tracking branch 'upstream/master'
Keep the latex and tag-specific feeds in bootstrap3 Conflicts: pelican-bootstrap3/templates/base.html
Diffstat (limited to 'zurb-F5-basic/static/js/foundation/foundation.tab.js')
-rw-r--r--zurb-F5-basic/static/js/foundation/foundation.tab.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/zurb-F5-basic/static/js/foundation/foundation.tab.js b/zurb-F5-basic/static/js/foundation/foundation.tab.js
new file mode 100644
index 0000000..f3dff80
--- /dev/null
+++ b/zurb-F5-basic/static/js/foundation/foundation.tab.js
@@ -0,0 +1,37 @@
+/*jslint unparam: true, browser: true, indent: 2 */
+;(function ($, window, document, undefined) {
+ 'use strict';
+
+ Foundation.libs.tab = {
+ name : 'tab',
+
+ version : '5.0.1',
+
+ settings : {
+ active_class: 'active'
+ },
+
+ init : function (scope, method, options) {
+ this.bindings(method, options);
+ },
+
+ events : function () {
+ $(this.scope).off('.tab').on('click.fndtn.tab', '[data-tab] > dd > a', function (e) {
+ e.preventDefault();
+
+ var tab = $(this).parent(),
+ target = $('#' + this.href.split('#')[1]),
+ siblings = tab.siblings(),
+ settings = tab.closest('[data-tab]').data('tab-init');
+
+ tab.addClass(settings.active_class);
+ siblings.removeClass(settings.active_class);
+ target.siblings().removeClass(settings.active_class).end().addClass(settings.active_class);
+ });
+ },
+
+ off : function () {},
+
+ reflow : function () {}
+ };
+}(jQuery, this, this.document));