• function

Append content to elements.

can.append(nodeList, html)


  1. nodeList {NodeList}

    A nodelist of the elements to append content to.

  2. html {String}

    The HTML to append to the end of the elements in nodeList.

can.append( wrappedNodeList, html ) inserts content to the end of each wrapped node list item(s) passed. This is a wrapper API for the underlying library being used. If you're using jQuery, this is a wrapper API for .append.

// Before
<div id="demo" />

can.append(can.$('#demo'), 'Demos are fun!');

// After
<div id="demo">Demos are fun!</div>