dist/owl.carousel2.thumbs.js
function (carousel) {


        /**
         * Reference to the core.
         * @protected
         * @type {Owl}
         */
        this.owl = carousel;


        /**
         * All DOM elements for thumbnails
         * @protected
         * @type {Object}
         */
        this._thumbcontent = [];


        /**
         * Instance identiefier
         * @type {number}
         * @private
         */
        this._identifier = 0;


        /**
         * Return current item regardless of clones
         * @protected
         * @type {Object}
         */
        this.owl_currentitem = this.owl.options.startPosition;


        /**
         * The carousel element.
         * @type {jQuery}
         */
        this.$element = this.owl.$element;


        /**
         * All event handlers.
         * @protected
         * @type {Object}
         */
        this._handlers = {
            'prepared.owl.carousel': $.proxy(function (e) {
                if (e.namespace && this.owl.options.thumbs && !this.owl.options.thumbImage && !this.owl.options.thumbsPrerendered && !this.owl.options.thumbImage) {
                    if ($(e.content).find('[data-thumb]').attr('data-thumb') !== undefined) {
                        this._thumbcontent.push($(e.content).find('[data-thumb]').attr('data-thumb'));
                    }
                } else if (e.namespace && this.owl.options.thumbs && this.owl.options.thumbImage) {
                    var innerImage = $(e.content).find('img');
                    this._thumbcontent.push(innerImage);
                }
            }, this),

            'initialized.owl.carousel': $.proxy(function (e) {
                if (e.namespace && this.owl.options.thumbs) {
                    this.render();
                    this.listen();
                    this._identifier = this.owl.$element.data('slider-id');
                    this.setActive();
                }
            }, this),

            'changed.owl.carousel': $.proxy(function (e) {
                if (e.namespace && e.property.name === 'position' && this.owl.options.thumbs) {
                    this._identifier = this.owl.$element.data('slider-id');
                    this.setActive();
                }
            }, this)
        };

        // set default options
        this.owl.options = $.extend({}, Thumbs.Defaults, this.owl.options);

        // register the event handlers
        this.owl.$element.on(this._handlers);
    }
function (carousel) {


        /**
         * Reference to the core.
         * @protected
         * @type {Owl}
         */
        this.owl = carousel;


        /**
         * All DOM elements for thumbnails
         * @protected
         * @type {Object}
         */
        this._thumbcontent = [];


        /**
         * Instance identiefier
         * @type {number}
         * @private
         */
        this._identifier = 0;


        /**
         * Return current item regardless of clones
         * @protected
         * @type {Object}
         */
        this.owl_currentitem = this.owl.options.startPosition;


        /**
         * The carousel element.
         * @type {jQuery}
         */
        this.$element = this.owl.$element;


        /**
         * All event handlers.
         * @protected
         * @type {Object}
         */
        this._handlers = {
            'prepared.owl.carousel': $.proxy(function (e) {
                if (e.namespace && this.owl.options.thumbs && !this.owl.options.thumbImage && !this.owl.options.thumbsPrerendered && !this.owl.options.thumbImage) {
                    if ($(e.content).find('[data-thumb]').attr('data-thumb') !== undefined) {
                        this._thumbcontent.push($(e.content).find('[data-thumb]').attr('data-thumb'));
                    }
                } else if (e.namespace && this.owl.options.thumbs && this.owl.options.thumbImage) {
                    var innerImage = $(e.content).find('img');
                    this._thumbcontent.push(innerImage);
                }
            }, this),

            'initialized.owl.carousel': $.proxy(function (e) {
                if (e.namespace && this.owl.options.thumbs) {
                    this.render();
                    this.listen();
                    this._identifier = this.owl.$element.data('slider-id');
                    this.setActive();
                }
            }, this),

            'changed.owl.carousel': $.proxy(function (e) {
                if (e.namespace && e.property.name === 'position' && this.owl.options.thumbs) {
                    this._identifier = this.owl.$element.data('slider-id');
                    this.setActive();
                }
            }, this)
        };

        // set default options
        this.owl.options = $.extend({}, Thumbs.Defaults, this.owl.options);

        // register the event handlers
        this.owl.$element.on(this._handlers);
    }
function ( carousel ) { /**
         * Reference to the core.
         * @protected
         * @type {Owl}
         */ this . owl = carousel ; /**
         * All DOM elements for thumbnails
         * @protected
         * @type {Object}
         */ this . _thumbcontent = [ ] ; /**
         * Instance identiefier
         * @type {number}
         * @private
         */ this . _identifier = 0 ; /**
         * Return current item regardless of clones
         * @protected
         * @type {Object}
         */ this . owl_currentitem = this . owl . options . startPosition ; /**
         * The carousel element.
         * @type {jQuery}
         */ this . $element = this . owl . $element ; /**
         * All event handlers.
         * @protected
         * @type {Object}
         */ this . _handlers = { 'prepared.owl.carousel' : $ . proxy ( function ( e ) { if ( e . namespace && this . owl . options . thumbs && ! this . owl . options . thumbImage && ! this . owl . options . thumbsPrerendered && ! this . owl . options . thumbImage ) { if ( $ ( e . content ) . find ( '[data-thumb]' ) . attr ( 'data-thumb' ) !== undefined ) { this . _thumbcontent . push ( $ ( e . content ) . find ( '[data-thumb]' ) . attr ( 'data-thumb' ) ) ; } } else if ( e . namespace && this . owl . options . thumbs && this . owl . options . thumbImage ) { var innerImage = $ ( e . content ) . find ( 'img' ) ; this . _thumbcontent . push ( innerImage ) ; } } , this ) , 'initialized.owl.carousel' : $ . proxy ( function ( e ) { if ( e . namespace && this . owl . options . thumbs ) { this . render ( ) ; this . listen ( ) ; this . _identifier = this . owl . $element . data ( 'slider-id' ) ; this . setActive ( ) ; } } , this ) , 'changed.owl.carousel' : $ . proxy ( function ( e ) { if ( e . namespace && e . property . name === 'position' && this . owl . options . thumbs ) { this . _identifier = this . owl . $element . data ( 'slider-id' ) ; this . setActive ( ) ; } } , this ) } ; // set default options this . owl . options = $ . extend ( { } , Thumbs . Defaults , this . owl . options ) ; // register the event handlers this . owl . $element . on ( this . _handlers ) ; }
Creates the thumbs plugin.
@class The thumbs Plugin
@param {Owl} carousel - The Owl Carousel
Creates the thumbs plugin .