JQuery remove div not working in Internet Explorer
javascript, joomla, jquery
Solution
<script>
$(document).ready(function(){
setTimeout(function() {
$("#yourDiv").remove();
}, 50000);
});
</script>
Check this fiddle, it's working in ie too.
Problem
I'm not really a javascript/jquery coder, I have a very simple code to remove a div that's not working in IE I'm using this in a Joomla page, so I call it like this: ``` $document->addScript("http://code.jquery.com/jquery-latest.js");//adiciona jquery ``` And than, in the body document: ``` <script> setTimeout(function() { $("#yourDiv").remove(); }, 50000); </script> ``` FireFox and Chrome are (as always) ok. Can someone point out my mistake please? Thanks a lot :) EDITED ************ I've tryied also with this code no jquery, but always not working in IE (9) ``` <script> setTimeout('yourFunction();', 5000); function yourFunction(){ var div = document.getElementById("yourDiv"); div.parentNode.removeChild(div); } </script> ```