fluidvids icon indicating copy to clipboard operation
fluidvids copied to clipboard

Question re fluidvids.render()

Open nickpish opened this issue 10 years ago • 0 comments

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.

nickpish avatar Nov 17 '14 11:11 nickpish