Skip to content

Instantly share code, notes, and snippets.

@foxxtrot
Created July 21, 2009 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxxtrot/151483 to your computer and use it in GitHub Desktop.
Save foxxtrot/151483 to your computer and use it in GitHub Desktop.
<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