How to get and set video src by clicking on div using jquery.

$(“.new-video #sub-video”).parent().click(function(e){
const videoSource = ($(this).children().attr(‘src’))
$(‘.video source’).attr(‘src’, videoSource)
});

Leave a comment

Your email address will not be published. Required fields are marked *