diff options
author | MaZderMind | 2014-10-20 21:20:08 +0200 |
---|---|---|
committer | MaZderMind | 2014-10-20 21:20:08 +0200 |
commit | 96a9b89ad2ea1237895db5177602ac2725f37b55 (patch) | |
tree | 73f351a4f9c814c3bffc8623b83af87655db82c8 /assets/js | |
parent | aaa3a9095ff940543065ef8e9534e48480c4568a (diff) |
irc in a tab
Diffstat (limited to '')
-rw-r--r-- | assets/js/lustiges-script.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index 0da6046..41bb399 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -10,7 +10,6 @@ $(function() { }); $('audio').mediaelementplayer(); -/* // activate tab via hash and default to video function setTabToHash() { var activeTab = $('.nav-tabs a[href=' + window.location.hash + ']').tab('show'); @@ -19,8 +18,6 @@ $(function() { window.location.hash = '#video'; } } - setTabToHash(); - // change hash on tab change $('.nav-tabs').on('shown.bs.tab', 'a', function (e) { @@ -28,6 +25,15 @@ $(function() { }); // adjust tabs when hash changes - $(window).on('hashchange', setTabToHash); -*/ + $(window).on('hashchange', setTabToHash).trigger('hashchange'); + + $('.click-to-irc').one('click', function() { + var + $irc = $(this), + $iframe = $(this).find('iframe'); + + $iframe.on('load', function() { + $irc.addClass('active'); + }).attr('src', $iframe.data('src')); + }); }); |