Sha256: 1eaabad00a9c057b14c478c0c191858c6d7dbd42555205876324de3d7ebc5c7e

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

(function($) {
  $(Screw)
    .bind('load', function() {    
      $('.describe, .it')
        .click(function() {
          document.location = location.href.split('?')[0] + '?' + $(this).fn('selector');
          return false;
        })
        .focus(function() {
          return $(this).addClass('focused');
        })
        .bind('scroll', function() {
          document.body.scrollTop = $(this).offset().top;
        });

      $('.it')
        .bind('enqueued', function() {
          $(this).addClass('enqueued');
        })
        .bind('running', function() {
          $(this).addClass('running');
        })
        .bind('passed', function() {
          $(this).addClass('passed');
        })
        .bind('failed', function(e, reason) {
          $(this).addClass('failed');
          $('<p class="error">')
            .text(reason.toString())
            .appendTo($(this));
        })
    })
    .bind('before', function() {
      $('.status').text('Running...');
    })
    .bind('after', function() {
      $('.status').fn('display')
    })
})(jQuery);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
btakita-screw_unit-0.1.0 core/lib/screw.events.js