fix error

This commit is contained in:
邱博亞 2021-11-15 14:31:09 +08:00
parent 2a56b10faa
commit 24bf89a3a8
1 changed files with 3 additions and 2 deletions

View File

@ -48,6 +48,9 @@
}else{ }else{
audio_div = $('<button class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></button>'); audio_div = $('<button class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></button>');
} }
audio_div.click(function(event) {
event.stopPropagation();
});
$self.append(audio_div); $self.append(audio_div);
} }
} }
@ -66,8 +69,6 @@
}) })
if (typeof onYouTubeIframeAPIReady !== 'function'){ if (typeof onYouTubeIframeAPIReady !== 'function'){
$(document).on('click touchstart',".jarallax-video-audio",function(event){ $(document).on('click touchstart',".jarallax-video-audio",function(event){
event.stopImmediatePropagation();
event.stopPropagation();
var $self = $(this).parent(); var $self = $(this).parent();
var $video = $self.find('video'); var $video = $self.find('video');
if ($self.hasClass('have-audio')){ if ($self.hasClass('have-audio')){