JQuery Remove() doesn't work
- by Xander Guerin
I have a DIV element inside another as follows:
<div id="filters">
<div class="filterData">hello</div>
</div>
and I'm trying to remove the element:
$("#filters").remove('.filterData');
Problem is, it doesn't. I've tested on other elements on my page and it works. The thing is, I cannot append to it, show or hide it, use .empty. I've also changed it to be a DIV with 'filterData' as the ID and told JQuery to remove it but it refuses to...
Has anyone had a stuborn element like this before?
EDIT: I'm also trying to remove it inside a $(document).ready function so I have no idea.