Sha256: 3c555677c5ae5d56b889143082e654fdcefb3531249e8b7201ff2d97c2724499

Contents?: true

Size: 1.87 KB

Versions: 2

Compression:

Stored size: 1.87 KB

Contents

/ 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();
    });
  });

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
breezeblocks-0.0.2 source/refills-page-scripts.html.haml
breezeblocks-0.0.1 source/refills-page-scripts.html.haml