Question: I wanna make a function that erases everything inside of a multiple select using jQuery.
Also if it could remove some text from text fields it'd be good too.

Answer: 
Try the following to clear **all** multiple `select` elements:

```
$('select[multiple]').empty();

```

Replace `select` with a specific element if you do not want to clear all of them. The same applies to the following chunk of code. It can be used to clear all text fields:

```
$(':text').val('');

```
In case you just want to deselect everything and not remove from the DOM, try

```

$("select").val([]);

```

or something with a more specific selector.