Module-documentation

version 1.0.0
module: vdom
maintanance: Marco Asbreuk
home
all modules

Remove element

This example removes a div-node

Click on the button to initiate the request.

This is the container which will be removed

Code-example:

<body>
    <div id="container">
        <button id="button-get">Click me to add data</button>
    </div>
    <div id="target-container">This is the target-container</div>
</body>
<script src="itsabuild-min.js"></script>
<script>
    var container = document.getElement('#target-container'),
        removeContainer;

    removeContainer = function(data) {
        container.remove();
    };

    ITSA.Event.after('tap', removeContainer, '#button-get');
</script>
API Docs