Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<html>
<head>
<title>Prepend Test</title>
</head>
<body>
<fieldset id="test_element">
Test Standards Compliance
<legend>Title of the Fieldset</legend>
<p>This is content.</p>
</fieldset>
<script src="http://yui.yahooapis.com/3.0.0b1/build/yui/yui-min.js" type="text/javascript"></script>
<script type="text/javascript">
YUI().use('node', function (Y) {
Y.get('#test_element').prepend('<p>This is new content.</p>');
Y.get('#test_element legend').insert('<p>This is <strong>even more</strong> new content.</p>', 'after');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment