Created
March 15, 2016 20:52
-
-
Save lots0logs/66426a98f156484b2bbc to your computer and use it in GitHub Desktop.
WordPress :: Divi Builder :: Background Videos :: Mute a video's audio.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function($) { | |
$(document).ready(function() { | |
var $videos = $('.et_pb_section_video_bg video'); | |
$videos.each(function() { | |
var $video = $(this)[0]; | |
$video.setMuted(); | |
}); | |
}); | |
})(jQuery); | |
</script> |
Anybody get this to work?
Adding script to Theme Option -> Integration -> Add code to the < head > of your blog
This works for me (https://stackoverflow.com/questions/42764981/divi-builder-background-video-to-be-muted/45194700#45194700)
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".et_pb_section_video_bg video").prop('muted', true);
});
</script>
Script works for me as well
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>This worked for me too, thank you bro.
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>This worked for me, thank you so much!
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".et_pb_section_video_bg video").prop('muted', true); }); </script>@daibangcanhcut Thank you, It worked like a charm.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where would I add this script please?