Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Created March 15, 2016 20:52
Show Gist options
  • Save lots0logs/66426a98f156484b2bbc to your computer and use it in GitHub Desktop.
Save lots0logs/66426a98f156484b2bbc to your computer and use it in GitHub Desktop.
WordPress :: Divi Builder :: Background Videos :: Mute a video's audio.
<script>
(function($) {
$(document).ready(function() {
var $videos = $('.et_pb_section_video_bg video');
$videos.each(function() {
var $video = $(this)[0];
$video.setMuted();
});
});
})(jQuery);
</script>
@RingahDing
Copy link

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>

@aiokaizen
Copy link

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>

@TinyUnicornTeeth
Copy link

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>

@Yasintha99
Copy link

@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