0

I have a looping background image on my website via the Divi theme.

I cannot mute the video through the theme functionality at all.

I've tried to use this:

$('video').prop('volume', 0)
$('video').prop('muted', true)

Any thoughts?

Obsidian Age
  • 41,205
  • 10
  • 48
  • 71
  • Possible duplicate of [Video mute/unmute with jQuery](http://stackoverflow.com/questions/21852284/video-mute-unmute-with-jquery) – Obsidian Age Mar 02 '17 at 21:47
  • My problem is different than the other solution. I don't want to create a button, I just want to mute the video. That solution does not work for me with this theme. If I'm missing something, please explain.... – user2763023 Mar 03 '17 at 21:27

1 Answers1

0

this works for me

(function($){
  $('video').prop('muted', true)
})(jQuery);

WordPress use jQuery and this solves compatibility problems with other libraries

You can use javascript without jquery.