app = window.app || {}; app.testimonialSlide = app.testimonialSlide || {}; /** * @requires $ jQuery * @requires $.fn.royalSlider Royal Slider */ app.testimonialSlide.Slide = qs.createObject(); app.testimonialSlide.Slide.prototype = { initialize: function (options) { this.options = $.extend(true, { containerId: undefined, slider: { arrowsNav: true, loop: true, keyboardNavEnabled: true, controlsInside: true, arrowsNavAutoHide: false, autoScaleSlider: true, allowCSS3: true, autoScaleSliderWidth: 978, autoScaleSliderHeight: 450, imageScaleMode: 'fill', imageAlignCenter: true, controlNavigation: 'bullets', thumbsFitInViewport: false, navigateByClick: true, startSlideId: 0, autoPlay: false, transitionType:'move', globalCaption: true, imgWidth: 1920, imgHeight: 450, slidesSpacing: 0, minSlideOffset: 0, block: { // animated blocks options go gere fadeEffect: true, moveEffect: 'left' } } }, options); this.container = $('#' + this.options.containerId); this.initSlider(); return this; }, initSlider: function () { this.container.royalSlider(this.options.slider); var slider = this.container.data('royalSlider'); slider.ev.on('rsBeforeAnimStart', function (event) { $('.rsContent').show(); }); slider.ev.trigger('rsBeforeAnimStart'); return this; } };