sjwilliams / scrollstory

A jQuery plugin for building scroll-based stories

Home Page:http://sjwilliams.github.io/scrollstory/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

check for `options.enabled` during init

sjwilliams opened this issue · comments

On init, the call to ._handleRepaint activates an item, even if the option enabled:false is set.

We should be able to remedy like so:

      // 1. offsets need to be accurate before 'complete'
      this.updateOffsets();

      // 2. handle any user actions
      this._trigger('complete', null, this);

      // 3. Set active item, and double check 
      // scroll position and offsets.
      if(this.options.enabled){
        this._handleRepaint();
      }

(see "95-degree-days" at the nytimes.com for an example)

Closed by dfe6ec7