From 002fda6a6bde4b9754d44b9b7473fc17118a6ba9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sat, 25 Feb 2012 21:54:41 -0500 Subject: [PATCH] ensure good rack version for @scottdavis and tweak a loading thing --- attentive.gemspec | 1 + lib/assets/javascripts/attentive.js.coffee | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/attentive.gemspec b/attentive.gemspec index 5f67ebf..e958bb5 100644 --- a/attentive.gemspec +++ b/attentive.gemspec @@ -31,5 +31,6 @@ Gem::Specification.new do |gem| gem.add_dependency 'thor' gem.add_dependency 'backbone-rails' + gem.add_dependency 'rack', '~> 1.4.0' end diff --git a/lib/assets/javascripts/attentive.js.coffee b/lib/assets/javascripts/attentive.js.coffee index eca76ab..8843230 100644 --- a/lib/assets/javascripts/attentive.js.coffee +++ b/lib/assets/javascripts/attentive.js.coffee @@ -79,7 +79,12 @@ class Slide class this.Attentive @setup: (identifier) -> - starter = -> (new Attentive(identifier)).start() + starter = -> + setTimeout( + -> + (new Attentive(identifier)).start() + , 250 + ) window.addEventListener('DOMContentLoaded', starter, false) constructor: (@identifier) ->