Soldato
I'm not adept at Javascript and I need to play a video on the click of an element based on its ID.
The page is at jonesmillbank.com/our-clients/newmarket. The current JS is unique to each element, for example:
I just want it so that it's '<a id="vxWBxx-JfDM">' instead and that passes to the iframe.
Thanks!
The page is at jonesmillbank.com/our-clients/newmarket. The current JS is unique to each element, for example:
Code:
<script>
$(document).ready(function(){
$("#rhine").click(function(){
$("#hiddenvid").show(50);
$("#hiddenvid iframe").attr('src', '//www.youtube.com/embed/vxWBxx-JfDM/hqdefault.jpg?rel=0&showinfo=0&autoplay=1');
});
});
</script>
<a id="rhine"><div class="content c4" style="background-image:url(../../../images/work/newmarket2.jpg)">
<p class="pimage">Rhine River Cruise</p>
</div></a>
I just want it so that it's '<a id="vxWBxx-JfDM">' instead and that passes to the iframe.
Thanks!