I'm having a little problem with JavaScript and wondered whether you could help me. I have an image and a video. I want to be able to click the image and to make the video at half transparency. I can't quite see why my code doesn't work.
Image
<img src="James Outlined.jpg" id="picture_on">
iFrame
<iframe width="630" height="350" src="https://www.youtube.com/embed/MmB9b5njVbA" frameborder="0" allowfullscreen id="MinecraftVideo"></iframe>
JavaScript code
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">
$(document).ready(function(){
$(“#picture_on”).click(function(){
$(“#MinecraftVideo”).animate({
opacity: '0.5'
});
});
});
</script>
”to".