Email: info@wordpresstechy.com
Where Developers Learn, Share, & Build Careers
Home › Forums › Javascript › Add controls attribute to video element using jQuery
Tagged: html, javascript, video
I am trying to figure out how to add controls to a video using jQuery. I have tried the following but it did not work:
$('.video-js').attr('controls', 'controls');
$('.video-js').attr('controls',true); Alternatively if you're using jQuery 1.6+ you may/should use $(".video-js").prop("controls",true);
Best Answer