Skip to main content
100%

Test for jQuery clone bug

✓ Published0🌍 Public
DDylanFM
Last edited Nov 23, 2010
Created on Nov 23, 2010

This example demonstrates a bug in jQuery 1.4.3 where cloning an HTML5 `<section>` element loses its inner markup, while a standard `<div>` clones correctly. The page renders two paragraphs—one inside a `<section>` and one inside a `<div>`—and uses jQuery’s `clone()` and `html()` methods to capture their HTML. The resulting strings are displayed in separate `<pre>` elements via `text()`. The code relies on the jQuery CDN and a document-ready handler, highlighting a parsing discrepancy between HTML5 semantic elements and legacy block elements in older jQuery versions.

AI-generated description

Similar vizzes