javascript - Add params in html5 video (jQuery) -
i'm beginner in javascript , jquery , add parameter video element javascript.
<script> $(document).ready(function () { $('#foo').append($('autoplay')); }); </script> <video id="foo" source type="video/mp4" src="foo.mp4">
i want result be:
<video id="foo" source type="video/mp4" src="foo.mp4" autoplay>
this didn't work me. suggestions?
to change property on element should use prop()
$('#foo').prop('autoplay', true);
Comments
Post a Comment