Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Testimonials Slider
- jQuery(window).load(function() {
- 'use strict';
- jQuery('.testimonials-slider[id^="owl-testimonials"]').each( function() {
- var $div = jQuery(this);
- var token = $div.data('token');
- var bool = true;
- var settingObj = window['dt_testimonials_' + token];
- if((settingObj.testimonial_speed == '') || (settingObj.testimonial_speed == 'false')) {
- bool = false;
- }
- jQuery("#owl-testimonials-"+settingObj.id+"").owlCarousel({
- autoHeight : true,
- items : 1,
- nav: true,
- navText: [
- "<i class='fa fa-angle-left'></i>",
- "<i class='fa fa-angle-right'></i>"
- ],
- rewind: true,
- rtl: false,
- autoplay: bool,
- autoplayTimeout: settingObj.testimonial_speed,
- autoplayHoverPause: true,
- dots: false,
- onInitialized: owlcallback,
- onChanged: owlcallback
- });
- function owlcallback(event){
- var items = event.item.count; // Number of items
- var item = event.item.index; // Position of the current item
- jQuery('.testimonials-slider-no-'+settingObj.id+'').text(""+(item+1)+"/" + items+"");
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement