javascript - How can i stop videos when i go to next slide -
website is: ortakbilinc.com can see slider on homepage. when click next slide video continues playing. how can fix it. i'm trying couldnt handle.
website is: ortakbilinc.com can see slider on homepage. when click next slide video continues playing. how can fix it. i'm trying couldnt handle.
feature slider -------------------------------------------------*/ if ($('.feature-slider').length) { $('.feature-slider').each(function() { var t = $(this); if (!t.hasclass('gallery-post-slider')) { var animation = t.data('sanimation'); var speed = t.data('speed'); var timeout = t.data('timeout'); var easing = t.data('easing'); var rndn = t.data('rndn'); var rtl = false; var autoplay = t.data('autoplay'); var items = t.data('items'); var animation_new = t.data('animation_new'); var animation_in = t.data('animation_in'); var animation_out = t.data('animation_out'); var margin = 10; var auto_height = 0; var thumbs_event = t.data('thumbs_event'); if(typeof thumbs_event === 'undefined'){ thumbs_event = 'click'; } if (t.hasclass('no_spaces')) { margin = 5; auto_height = 1; } t.find('.fs-image-nav .fs-thumb').each(function(i) { $(this).addclass( 'item'+i ); if (t.hasclass('old-style')) { $(this).click(function() { t.find('.fslides').trigger( 'slideto', [i, 0, true] ); return false; }); } }); t.find('.fs-image-nav .fs-thumb.item0').addclass( 'active' ); var carou_items = 6; if ($(window).width() < 768) { carou_items = 5; } if ($(window).width() < 568) { carou_items = 4; } if ($(window).width() < 480 ) { carou_items = 2; } if ($('body').hasclass('rtl')) { rtl = true; } if (!t.hasclass('old-style')) { var owl = t.find('.fslides'); var slides_count = owl.children('.fslide').length; if (slides_count == 1) { t.addclass('fs-with-one-slide'); } if (slides_count > 1) { owl.owlcarousel({ items: 1, baseclass: 'mom-carousel', rtl: rtl, autoplay:autoplay, autoplaytimeout:timeout, autoplayhoverpause : false, loop: true, animateout: animation_out, animatein: animation_in, smartspeed:1000, //autoheight: true, }); t.find('.fslides').imagesloaded( function() { t.find('.fs-image-nav .fs-thumbs').owlcarousel({ items: items, baseclass: 'mom-carousel', rtl: rtl, loop: true, margin : margin, }); //var thumb_height = t.find('.fs-image-nav .fs-thumbs .fs-thumb').eq(0).css('height'); //t.find('.fs-image-nav .fs-thumbs').css('max-height', thumb_height); owl.on('changed.owl.carousel', function(event) { var pos = $(event.target).find(".fslide").eq(event.item.index).data('i'); //console.log(pos); $('.fc-nav-'+rndn+' .fs-thumb').removeclass( 'active' ); $('.fc-nav-'+rndn+' .fs-thumb.item'+pos).addclass( 'active' ); var page = math.floor( pos / items ); t.find('.fs-image-nav .fs-thumbs').trigger( 'to.owl.carousel', page ); }); t.find('.fs-image-nav .fs-thumb').on(thumbs_event, function() { var = $(this).data('i'); owl.trigger('to.owl.carousel', [i]); }); t.find('.fs-image-nav .fs-prev, .fsd-prev').click(function() { owl.trigger('prev.owl.carousel'); }); t.find('.fs-image-nav .fs-next, .fsd-next').click(function() { owl.trigger('next.owl.carousel'); }); }); } } else { t.find('.fslides').caroufredsel({ circular: true, responsive: true, swipe: { ontouch: true, fx : 'scroll' }, items: 1, auto: { play: autoplay, duration: speed, timeoutduration: timeout, }, prev: '.fc-nav-'+rndn+' .fs-prev, .fs-dnav-'+rndn+' span.fsd-prev', next: '.fc-nav-'+rndn+' .fs-next, .fs-dnav-'+rndn+' span.fsd-next', pagination: '.fs-nav-'+rndn, scroll: { fx: animation, duration : speed, easing : easing, pauseonhover : true, onbefore: function() { var pos = $(this).triggerhandler( 'currentposition' ); $('.fc-nav-'+rndn+' div').removeclass( 'active' ); $('.fc-nav-'+rndn+' div.item'+pos).addclass( 'active' ); var page = math.floor( pos / carou_items ); $('.fc-nav-'+rndn+' .fs-thumbs').trigger( 'slidetopage', page ); }, onafter: function() { } } }); t.find('.fs-image-nav .fs-thumbs').caroufredsel({ auto: false, circular:true, responsive: true, swipe: { ontouch: true }, items: carou_items, scroll: { items:carou_items, } }); } } //if not post gallery });
Comments
Post a Comment