dist/toolkit.js
function(element, options) {
        element = this.setElement(element);
        options = this.setOptions(options, element);

        // Setup classes and ARIA
        element
            .attr('role', 'complementary')
            .addClass(options.animation);

        // Determine before calculations
        var initialTop = element[0].style.top; // jQuery sometimes returns auto

        this.initialTop = (initialTop === 'auto') ? 0 : parseInt(initialTop, 10);
        this.elementTop = element.offset().top;

        // Initialize events
        var throttle = options.throttle;

        this.addEvents([
            ['scroll', 'window', $.throttle(this.onScroll.bind(this), throttle)],
            ['resize', 'window', $.throttle(this.onResize.bind(this), throttle)],
            ['ready', 'document', 'onResize']
        ]);

        this.initialize();
    }
function(element, options) {
        element = this.setElement(element);
        options = this.setOptions(options, element);

        // Setup classes and ARIA
        element
            .attr('role', 'complementary')
            .addClass(options.animation);

        // Determine before calculations
        var initialTop = element[0].style.top; // jQuery sometimes returns auto

        this.initialTop = (initialTop === 'auto') ? 0 : parseInt(initialTop, 10);
        this.elementTop = element.offset().top;

        // Initialize events
        var throttle = options.throttle;

        this.addEvents([
            ['scroll', 'window', $.throttle(this.onScroll.bind(this), throttle)],
            ['resize', 'window', $.throttle(this.onResize.bind(this), throttle)],
            ['ready', 'document', 'onResize']
        ]);

        this.initialize();
    }
function ( element , options ) { element = this . setElement ( element ) ; options = this . setOptions ( options , element ) ; // Setup classes and ARIA element . attr ( 'role' , 'complementary' ) . addClass ( options . animation ) ; // Determine before calculations var initialTop = element [ 0 ] . style . top ; // jQuery sometimes returns auto this . initialTop = ( initialTop === 'auto' ) ? 0 : parseInt ( initialTop , 10 ) ; this . elementTop = element . offset ( ) . top ; // Initialize events var throttle = options . throttle ; this . addEvents ( [ [ 'scroll' , 'window' , $ . throttle ( this . onScroll . bind ( this ) , throttle ) ] , [ 'resize' , 'window' , $ . throttle ( this . onResize . bind ( this ) , throttle ) ] , [ 'ready' , 'document' , 'onResize' ] ] ) ; this . initialize ( ) ; }
Initialize the pin.

@param {jQuery} element
@param {Object} [options]
Initialize the pin .