src/jquery.timelineMe.js
function(item) {
            if(!item || (item && !item.element) || (item && !item.position))
                return;

            switch(item.position) {
                case 'left':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-left');
                    break;
                case 'top':
                    item.element
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-top');
                    break;
                case 'right':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-right');
                    break;
                case 'bottom':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-left')
                    .addClass('timeline-me-bottom');
                    break;
            }

            return item;
        }
function(item) {
            if(!item || (item && !item.element) || (item && !item.position))
                return;

            switch(item.position) {
                case 'left':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-left');
                    break;
                case 'top':
                    item.element
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-top');
                    break;
                case 'right':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-right');
                    break;
                case 'bottom':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-left')
                    .addClass('timeline-me-bottom');
                    break;
            }

            return item;
        }
function ( item ) { if ( ! item || ( item && ! item . element ) || ( item && ! item . position ) ) return ; switch ( item . position ) { case 'left' : item . element . removeClass ( 'timeline-me-top' ) . removeClass ( 'timeline-me-right' ) . removeClass ( 'timeline-me-bottom' ) . addClass ( 'timeline-me-left' ) ; break ; case 'top' : item . element . removeClass ( 'timeline-me-left' ) . removeClass ( 'timeline-me-right' ) . removeClass ( 'timeline-me-bottom' ) . addClass ( 'timeline-me-top' ) ; break ; case 'right' : item . element . removeClass ( 'timeline-me-top' ) . removeClass ( 'timeline-me-left' ) . removeClass ( 'timeline-me-bottom' ) . addClass ( 'timeline-me-right' ) ; break ; case 'bottom' : item . element . removeClass ( 'timeline-me-top' ) . removeClass ( 'timeline-me-right' ) . removeClass ( 'timeline-me-left' ) . addClass ( 'timeline-me-bottom' ) ; break ; } return item ; }
Method that refresh item's class depending on its 'position' property
Method that refresh item s class depending on its position property