Skip to main content

Bug Tracker

Side navigation

Ticket #4618: test.html
File test.html, 0.6 KB (added by jamesfancy, May 03, 2009 03:14PM UTC)

The sample file. jquery.js should be put into the same directory.

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset:utf-8"/>
    <title>Test</title>
</head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function() {
    //$.get("t.html", function(data) {
    //    $(data).find(":header").each(function() {
    //        $("body").append("<div>" + $(this).html() + "</div>");
    //    });
    //});
    $("<h1>1</h1><h2>1.1</h2><h3>1.1.1</h3><div><h1>2</h1><h2>2.1</h2><h3>2.1.1</h3></div>")
            .find(":header").each(function() {
        $("body").append("<div>" + $(this).html() + "</div>");
    });
});
//</script>
<body>
</body>
</html>

Download in other formats:

Original Format