[Solved] Convert from JavaScript function to jQuery


This is my solution, in the future post your HTML code for helping us to solve the problem:

$(function(){
    $('.thumbnail').click(function(){
        $('#mainVideo').replaceWith('<video id="mainVideo" width=320 height=240 autoplay></video>');
       $('#mainVideo').html($(this).html());
    });
});

Here is the fiddle

4

solved Convert from JavaScript function to jQuery