Module-documentation

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

Appending content

This example appends content to a diV-container

Click on the button to initiate the request.

This is the target-container

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'),
        addContent;

    addContent = function(e) {
        container.append('<br>Some <i>new data</i>');
    };

    ITSA.Event.after('tap', addContent, '#button-get');

</script>
API Docs