Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/evase (27-Jan @ 16:47)

Syntax Highlighted Code

  1. $.fx.step.togglePair = function( fx ) {
  2.     if ( !fx.togglePair ) {
  3.         fx.togglePair = {};
  4.         $.each( toggleProps, function() {
  5.             var options = {
  6.                 complete: fx.options.complete,
  7.                 duration: fx.options.duration,
  8.                 queue: fx.options.queue
  9.             };
  10.             fx.togglePair[ this ] = new $.fx( fx.elem, options, this );
  11.         });
  12.     }
  13.  
  14.     var total = 0;
  15.     $.each( fx.togglePair, function( prop, propFx ) {
  16.         propFx.pos = fx.pos;
  17.         propFx.now = propFx.start + (propFx.end - propFx.start) * propFx.pos;
  18.         propFx.now = Math.round( propFx.now );
  19.         total += propFx.now;
  20.         fx.elem.style[ prop ] = propFx.now + propFx.unit;
  21.     });
  22.     // TODO: handle height
  23. };

Plain Code

$.fx.step.togglePair = function( fx ) {
    if ( !fx.togglePair ) {
        fx.togglePair = {};
        $.each( toggleProps, function() {
            var options = {
                complete: fx.options.complete,
                duration: fx.options.duration,
                queue: fx.options.queue
            };
            fx.togglePair[ this ] = new $.fx( fx.elem, options, this );
        });
    }

    var total = 0;
    $.each( fx.togglePair, function( prop, propFx ) {
        propFx.pos = fx.pos;
        propFx.now = propFx.start + (propFx.end - propFx.start) * propFx.pos;
        propFx.now = Math.round( propFx.now );
        total += propFx.now;
        fx.elem.style[ prop ] = propFx.now + propFx.unit;
    });
    // TODO: handle height
};

Codedump Run

Permalink: http://codedumper.com/evase