app/assets/javascripts/pageflow/slideshow/scroll_indicator_widget.js in pageflow-0.5.0 vs app/assets/javascripts/pageflow/slideshow/scroll_indicator_widget.js in pageflow-0.6.0

- old
+ new

@@ -1,13 +1,20 @@ (function($) { $.widget('pageflow.scrollIndicator', { _create: function() { var parent = this.options.parent, - that = this; + that = this; parent.on('pageactivate', function(event) { - that.element.toggleClass('invert', $(event.target).hasClass('invert')); + var page = $(event.target); + var invertIndicator = page.data('invertIndicator'); + + if (typeof invertIndicator === 'undefined') { + invertIndicator = page.hasClass('invert'); + } + + that.element.toggleClass('invert', invertIndicator); }); parent.on('scrollerhintdown', function() { that.element.addClass('animate'); setTimeout(function() { @@ -24,8 +31,18 @@ }); parent.on('scrollernotnearbottom slideshowchangepage', function() { that.element.removeClass('visible'); }); + + $.when(pageflow.ready, pageflow.manualStart).done(function() { + setTimeout(function() { + that.element.addClass('attract'); + setTimeout(function() { + that.element.removeClass('attract'); + }, 1500); + }, 3000); + }); + } }); }(jQuery)); \ No newline at end of file