I have a video on my webpage like so:
<div id="videoContainer">
<video id="video1" width="960" controls autoplay>
<source src=static/media/Wreck_It_Ralph_Trailer.mp4 type="video/mp4">
Your browser does not support html5 video
</video>
and I want to change the source of the video using jquery/javascript. I have this code but it doesn't work
$('source').attr({'src':'static/media/Here_Comes_The_Boom_Official_Trailer.mp4'})
Can someone say why this isn't working or suggest a correct way to do it?