js/components/stalker.js
function() {
        var isWindow = this.container.is(window),
            eTop = this.element.offset().top,
            offset,
            offsets = [];

        if (this.element.css('overflow') === 'auto' && !this.element.is('body')) {
            this.element[0].scrollTop = 0; // Set scroll to top so offsets are correct
        }

        this.targets = $(this.options.target);

        this.markers = $(this.options.marker).each(function(index, marker) {
            offset = $(marker).offset();

            if (!isWindow) {
                offset.top -= eTop;
            }

            offsets.push(offset);
        });

        this.offsets = offsets;
    }
function() {
        var isWindow = this.container.is(window),
            eTop = this.element.offset().top,
            offset,
            offsets = [];

        if (this.element.css('overflow') === 'auto' && !this.element.is('body')) {
            this.element[0].scrollTop = 0; // Set scroll to top so offsets are correct
        }

        this.targets = $(this.options.target);

        this.markers = $(this.options.marker).each(function(index, marker) {
            offset = $(marker).offset();

            if (!isWindow) {
                offset.top -= eTop;
            }

            offsets.push(offset);
        });

        this.offsets = offsets;
    }
function ( ) { var isWindow = this . container . is ( window ) , eTop = this . element . offset ( ) . top , offset , offsets = [ ] ; if ( this . element . css ( 'overflow' ) === 'auto' && ! this . element . is ( 'body' ) ) { this . element [ 0 ] . scrollTop = 0 ; // Set scroll to top so offsets are correct } this . targets = $ ( this . options . target ) ; this . markers = $ ( this . options . marker ) . each ( function ( index , marker ) { offset = $ ( marker ) . offset ( ) ; if ( ! isWindow ) { offset . top -= eTop ; } offsets . push ( offset ) ; } ) ; this . offsets = offsets ; }
Gather the targets and markers used for stalking.
Gather the targets and markers used for stalking .