How to use Semantic UI removable icon

1.6k Views Asked by At

Semantic UI haven't documented how the removable widget works.

Below is an example of what I mean

The small x icon is what I mean by removable. What is the Semantic UI call I need to get this to make this work so that when I click on the small x it removes that element?

1

There are 1 best solutions below

0
On BEST ANSWER

Managed to do this manually using the following function:

var removeParent = function(e) {
    $(e).parent().remove();
};

Then in my HTML I added an onclick event to the element and passed in this.

<div class="ui huge label" style="margin: 7px"> 
    <i class="edit icon"></i> 
    <i class="delete icon" onclick="removeParent(this)"></i>
</div>

Answer taken from Here