/ Type System tabs :javascript var $tabs, $toggles, ACTIVE_CLASS; ACTIVE_CLASS = 'js-is-active'; $tabs = $("[data-role='tab']"); $toggles = $tabs.find("[data-role='link']"); $toggles.on('click', function(event) { var $tab, $toggle; event.preventDefault(); $toggle = $(this); $tab = $toggle.closest($tabs); if (!$tab.hasClass(ACTIVE_CLASS)) { $tabs.removeClass(ACTIVE_CLASS); return $tab.addClass(ACTIVE_CLASS); } }); / Show Code :javascript $('a.js-show-code').on('click', function(e){ $(this).hide(); $(this).siblings('.js-hide-code').css('display', 'inline-block'); $(this).parent().siblings('.snippets-table').show(); e.preventDefault(); }) $('a.js-hide-code').on('click', function(e) { $(this).hide(); $(this).siblings('.js-show-code').css("display", "inline-block"); $(this).parent().siblings('.snippets-table').hide(); e.preventDefault(); }); / Copy Code :javascript $(document).ready( function() { client = new ZeroClipboard($('.copy-source'), {moviePath: '/images/ZeroClipboard.swf'}) client.on('dataRequested', function(client, args) { if ($(this).hasClass("copy-coffee")) { var cell = $(this).parents("tr").find("td.snippet").last(); } else { var cell = $(this).parents("td.snippet"); } var code = cell.children("pre").text(); client.setText(code); }); }); :javascript $(document).ready(function(){ $('.js-menu-trigger-breezeblocks').on('click touchstart', function(e){ $('.er_toc').toggleClass('is-visible'); $('.js-menu-screen-breezeblocks').toggleClass('is-visible'); e.preventDefault(); }); $('.js-menu-screen-breezeblocks').on('click touchstart', function(e){ $('.er_toc').toggleClass('is-visible'); $('.js-menu-screen-breezeblocks').toggleClass('is-visible'); e.preventDefault(); }); });