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) ->