Skip to content

Instantly share code, notes, and snippets.

@DylanFM
Created November 23, 2010 06:12
Show Gist options
  • Save DylanFM/711351 to your computer and use it in GitHub Desktop.
Save DylanFM/711351 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<title>Test for jQuery clone bug</title>
</head>
<body>
<section>
<p>Here is a little paragraph.</p>
</section>
<pre id="html5"></pre>
<hr>
<div>
<p>Here is a little paragraph.</p>
</div>
<pre id="html4"></pre>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script>
$(function () {
$('#html5').text( $('section').clone().html() );
$('#html4').text( $('div').clone().html() );
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment