Fix padding bug.

This commit is contained in:
BoHung Chiu 2022-03-07 19:25:29 +08:00
parent aba83ea30e
commit 826f374fe6
2 changed files with 4 additions and 3 deletions

View File

@ -234,7 +234,7 @@
var is_frontend = <%= @is_frontend ? true : false %>;
if(is_frontend){
var cyclediv = $(this).parents("div.cycle-slideshow").eq(0);
cyclediv.css("padding-top",'0');
cyclediv.css("padding-bottom",'');
if(cyclediv.height() == 0 || cyclediv.data("auto-height")){
cyclediv.data("auto-height",true);
var video_block = cyclediv.find('video')[0];

View File

@ -129,7 +129,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
'onReady': function(event){
var height = $(event.target.getIframe()).height();
var banner_wrap = $(iframe).parents('.w-ba-banner__wrap').eq(0);
banner_wrap.height(height).css({"padding-bottom":"","padding-top":"0"});
banner_wrap.height(height).css({"padding-bottom":"","padding-top":""});
banner_wrap.find(".cycle-carousel-wrap").css("top","3em");
try{
delete (event.target.B || event.target.H || event.target.I).onStateChange;
@ -196,7 +196,8 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
/*
var height = opts.slides.filter('.active').height() || opts.slides.height();
banner_wrap.height(height)*/
banner_wrap.css("padding-bottom","");
if(banner_wrap.find('.cycle-slide-active iframe').length != 0)
banner_wrap.css("padding-bottom","");
{{extra_document_ready_script}}
$('.pause-slide').off('click').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');