Question: In Joomla I used the jevent component. After disabling it I still see the jevent link in my administrator menu on the backend. Why? How can I get rid of it?

Answer: 
Use jquery's [unwrap()](https://api.jquery.com/unwrap/) 

```
    var el = $('div[id^="token-input-code"]');
        el.parent('li').unwrap();
        el.parent('ul').unwrap();

```
You can detach the parent elements with a function like this:

```
function detachInput(id) {
    var li = $('#' + id).closest('li');
    if (li.siblings().length === 0) {
        li.closest('ul').detach();
    } else {
        li.detach();
    }
}

```

This assumes that `ul` elements can contain multiple `li` elements and that you only want to remove the `ul` when it's empty.

Invoke it like this:

```
detachInput("token-input-code-" + id[1]);

```

You should consider whether you really want to [detach](https://api.jquery.com/detach/) or actually [remove](https://api.jquery.com/remove/).