Skip to content

Instantly share code, notes, and snippets.

@ericf
Created March 23, 2010 04:04
Show Gist options
  • Select an option

  • Save ericf/340829 to your computer and use it in GitHub Desktop.

Select an option

Save ericf/340829 to your computer and use it in GitHub Desktop.
// DOM API
var content = document.getElementById('content'),
p = document.createElement('p'),
a = document.createElement('a');
p.id = 'markout';
a.href = 'http://oddnut.com/markout/';
p.appendChild(a)
content.appendChild(p);
// Markout
Y.Markout('#content').p({ id: 'markout' }).a({ href: 'http://oddnut.com/markout/' }).text('MarkoutJS');
<!-- Desired Output -->
<div id="content">
<p id="markout"><a href="http://oddnut.com/markout/">MarkoutJS</a></p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment