I have code like this:

```
  $('#mb-history').on('click', '#post-edit .buttons .delete', function() {
    var files = $('.files input:checked').map(function() {
      return $(this).closest('.file');
    });
    var ids = files.map(function() {
      return $(this).data('id');
    }).get();
    console.log(ids);

    files.remove(); // this don't work

    return false;
  });

```

and files.remove() don't work the element stay in the DOM. (console.log show array with element I've selected). My html look like this:

```
<div class="files ui-helper-clearfix" style="display: block;">
    ...
    <div class="file" data-id="13835">
      <img src="/thumb.php?src=moja-budowa%2F611%2FMB_Z3_611_13835.jpg&amp;size=90&amp;height=64&amp;nologo" alt="">
      <input type="checkbox">
    </div>
    ...
</div>

```

What's wrong with my code? I'm using jquery-1.8.2.

**[JSFIDDLE](http://jsfiddle.net/EQ8yk/)**