summaryrefslogtreecommitdiffstats
path: root/public/ng/js/utils/tabs.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/ng/js/utils/tabs.js')
-rw-r--r--public/ng/js/utils/tabs.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/public/ng/js/utils/tabs.js b/public/ng/js/utils/tabs.js
deleted file mode 100644
index 2e2731eff0..0000000000
--- a/public/ng/js/utils/tabs.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- js tabs and tabbed content plugin
- */
-function Tabs(selector) {
-
- function hide($nav) {
- console.log("hide", $nav);
- $nav.removeClass("js-tab-nav-show");
- $($nav.data("tab-target")).removeClass("js-tab-show").hide();
- }
-
- function show($nav) {
- console.log("show", $nav);
- $nav.addClass("js-tab-nav-show");
- $($nav.data("tab-target")).addClass("js-tab-show").show();
- }
-
- var $e = $(selector);
- if ($e.length) {
- // pre-assign init index
- var $current = $e.find('.js-tab-nav-show');
- if ($current.length) {
- $($current.data("tab-target")).addClass("js-tab-show");
- }
- // bind nav click
- $e.on("click", ".js-tab-nav", function (e) {
- e.preventDefault();
- var $this = $(this);
- // is showing, not change.
- if ($this.hasClass("js-tab-nav-show")) {
- return;
- }
- $current = $e.find(".js-tab-nav-show").eq(0);
- hide($current);
- show($this);
- });
- console.log("init tabs @", selector)
- }
-}
-
-$.fn.extend({
- tabs: function () {
- Tabs(this);
- }
-}); \ No newline at end of file