diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-24 04:18:03 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-24 04:18:03 +0000 |
commit | c09c2786d0654f144dab103292c47411ff1afa9a (patch) | |
tree | 9a49cf5c1a0502ef7382bb54312097c375666ced /webgui/data/tabs.js | |
parent | c1451ffcbc021e4f25721541538173f24be8f3cc (diff) | |
download | thermoprint-c09c2786d0654f144dab103292c47411ff1afa9a.tar thermoprint-c09c2786d0654f144dab103292c47411ff1afa9a.tar.gz thermoprint-c09c2786d0654f144dab103292c47411ff1afa9a.tar.bz2 thermoprint-c09c2786d0654f144dab103292c47411ff1afa9a.tar.xz thermoprint-c09c2786d0654f144dab103292c47411ff1afa9a.zip |
Partial GUI prototype
Diffstat (limited to 'webgui/data/tabs.js')
-rw-r--r-- | webgui/data/tabs.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/webgui/data/tabs.js b/webgui/data/tabs.js new file mode 100644 index 0000000..1d178d9 --- /dev/null +++ b/webgui/data/tabs.js | |||
@@ -0,0 +1,13 @@ | |||
1 | jQuery(document).ready(function() { | ||
2 | jQuery('.tabs .tab-links a').on('click', function(e) { | ||
3 | var currentAttrValue = jQuery(this).attr('href'); | ||
4 | |||
5 | // Show/Hide Tabs | ||
6 | jQuery('.tabs ' + currentAttrValue).show().siblings().hide(); | ||
7 | |||
8 | // Change/remove current tab to active | ||
9 | jQuery(this).parent('li').addClass('active').siblings().removeClass('active'); | ||
10 | |||
11 | e.preventDefault(); | ||
12 | }); | ||
13 | }); | ||