src/jquery.timelineMe.js
function(item) {
            var itemElm;
            switch(item.type) {
                case 'milestone':
                    itemElm = this._buildMilestoneElement(item);
                    break;
                case 'smallItem':
                    itemElm = this._buildSmallItemElement(item);
                    break;
                case 'bigItem':
                    itemElm = this._buildBigItemElement(item);
                    break;
            }
            item.element = itemElm;
            this._refreshItemPosition(item);

            item.element.on('timelineMe.itemHeightChanged', function(event) {
                // Do some stuff
            });
            item.element.on('timelineMe.smallItem.displayfull', function(event) {
                // Do some stuff
            });
            item.element.on('timelineMe.bigItem.flipped', function(event) {
                var container = item.element.find('.timeline-me-content-container');
                if(item.element.hasClass('timeline-me-flipped')) {
                    container.height(item.fullContentElement.outerHeight());
                } else {
                    container.height(item.shortContentElement.outerHeight());
                }
            });

            this._buildItemContent(item);
            this._fillItem(item);

            return itemElm;
        }
function(item) {
            var itemElm;
            switch(item.type) {
                case 'milestone':
                    itemElm = this._buildMilestoneElement(item);
                    break;
                case 'smallItem':
                    itemElm = this._buildSmallItemElement(item);
                    break;
                case 'bigItem':
                    itemElm = this._buildBigItemElement(item);
                    break;
            }
            item.element = itemElm;
            this._refreshItemPosition(item);

            item.element.on('timelineMe.itemHeightChanged', function(event) {
                // Do some stuff
            });
            item.element.on('timelineMe.smallItem.displayfull', function(event) {
                // Do some stuff
            });
            item.element.on('timelineMe.bigItem.flipped', function(event) {
                var container = item.element.find('.timeline-me-content-container');
                if(item.element.hasClass('timeline-me-flipped')) {
                    container.height(item.fullContentElement.outerHeight());
                } else {
                    container.height(item.shortContentElement.outerHeight());
                }
            });

            this._buildItemContent(item);
            this._fillItem(item);

            return itemElm;
        }
function ( item ) { var itemElm ; switch ( item . type ) { case 'milestone' : itemElm = this . _buildMilestoneElement ( item ) ; break ; case 'smallItem' : itemElm = this . _buildSmallItemElement ( item ) ; break ; case 'bigItem' : itemElm = this . _buildBigItemElement ( item ) ; break ; } item . element = itemElm ; this . _refreshItemPosition ( item ) ; item . element . on ( 'timelineMe.itemHeightChanged' , function ( event ) { // Do some stuff } ) ; item . element . on ( 'timelineMe.smallItem.displayfull' , function ( event ) { // Do some stuff } ) ; item . element . on ( 'timelineMe.bigItem.flipped' , function ( event ) { var container = item . element . find ( '.timeline-me-content-container' ) ; if ( item . element . hasClass ( 'timeline-me-flipped' ) ) { container . height ( item . fullContentElement . outerHeight ( ) ) ; } else { container . height ( item . shortContentElement . outerHeight ( ) ) ; } } ) ; this . _buildItemContent ( item ) ; this . _fillItem ( item ) ; return itemElm ; }
Method that create the item's html structure and fill it
Method that create the item s html structure and fill it