Closed akramgassem closed 8 years ago
Clear content.
How to clear content ? No API functions ? Ty.
Here is a trash fix for you! Attach this function to your close button and give your div an id name, example divID. function endVideo() { var video = $("#divID iframe").attr("src"); $("#divID iframe").attr("src",""); $("#divID iframe").attr("src",video); }
Best solution. Try this code:
$(document).on('closed', '.remodal', function (e) {
var src = $(this).find('iframe').attr('src');
$(this).find('iframe').attr('src', '');
$(this).find('iframe').attr('src', src);
});
I have use Remodal to insert a embed Youtube video but when you close the modal, the video still playing. Please any solution to prevent closing video when the modal is closed.