fluidvids
fluidvids copied to clipboard
Question re fluidvids.render()
Hi, I'm using the following jQuery click function to swap in a YouTube video for an image using the data-video
attribute:
$('img.play-video').click(function(){
video = '<iframe width=560 height=315 frameborder="0" allowfullscreen src="'+ $(this).attr('data-video') +'"></iframe>';
$(this).replaceWith(video);
});
I'm wondering if I can apply fluidvids to a video inserted in this way, perhaps by using fluidvids.render()
, and if so, how I would go about implementing it? Is this something I'd reference in the click function itself? Thanks for any assistance here.