How do I remove a flash video completely after the video was called by swfobject
-
21-09-2019 - |
Question
Via SWFobject and AJAX I put in a video to a certain <div>
.
Using jQuery I tried this:
$('#youtubepreview').html('');
However that didn't remove it at all - the video still stayed right there.
Any ideas?
Solution
This worked for me:
$("#youtubepreview object").remove();
OTHER TIPS
SWFObject also has a removeSWF method you can invoke if needed.
Assuming the SWF was embedded with the ID "mySwfID":
swfobject.removeSWF("mySwfID");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow