I am trying to get Ajax to remove an element within that same Ajax page. I make a call to a document via Ajax with the following code, but it doesn't remove the element:
<input type="text" value="test" name="someel" class="someelement" />
<script type="text/javascript">
$('.someelement').remove();
</script>
I am using datatype = 'html' and other jquery stuff works, but it only works when I use things like the live function and I don't believe you can use that for removing elements, but I could be wrong.
Thanks.
EDIT:
Ajax Call:
$.ajax({
url: someurl,
type: 'post',
data: postvars,
cache: false,
dataType: "html",
success: function (html) {
$('#somediv').html(html);
}
});
EDIT 2:
Example: REMOVED URL