Sha256: e24a8d91d2dfd128cff52326178815e6665e070ed9ef550c30f865530213d869
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
require 'gnawrnip/photographer' require 'turnip_formatter/template' module Gnawrnip::JS class Photographer include Gnawrnip::Photographer def animation(images) images.map { |img| single(img) }.join end end end TurnipFormatter::Template.add_js(<<-EOS) $('.screenshot.animation').each(function() { var imgs = $(this).children('img'); var frame = 0; imgs.hide(); setInterval(function() { imgs.hide(); imgs.eq(frame).show(); frame = (++frame % imgs.length); }, #{Gnawrnip.frame_interval.to_s}); }); EOS
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gnawrnip-0.1.1 | lib/gnawrnip/js/photographer.rb |