What's wrong with my code
This is the first thing I write in javascript, so I hope its a basic error

What I'm trying to achieve here:
Take a bunch of links from a page, load their contents query for links inside and add them to a list on current page.

I get error on the append
And in JQ documentation they say the method can get a JQ object

        <script type="text/javascript">
        $(document).ready(
    function () {

        var wtf = $(".download");
        var links = $("a", wtf)
        links.each(
        function (index) {
            var newFrame = document.createElement("div");
            $(newFrame).load($(this).context.href,
                function (response, status, xhr) {
                    if (status == "error") {
                        alert("error");
                    }
                    $("a", response).each(
                     function (index) {
                         $("#results").append($(this));
                      
                     }
                    );
                });


            //  $("#results").append(newFrame);
        }
        );
    }
    );

   
    </script>


What's wrong with my code
===

This is the first thing I write in javascript, so I hope its a basic error

What I'm trying to achieve here:
Take a bunch of links from a page, load their contents query for links inside and add them to a list on current page.

I get error on the append
And in JQ documentation they say the method can get a JQ object

        <script type="text/javascript">
        $(document).ready(
    function () {

        var wtf = $(".download");
        var links = $("a", wtf)
        links.each(
        function (index) {
            var newFrame = document.createElement("div");
            $(newFrame).load($(this).context.href,
                function (response, status, xhr) {
                    if (status == "error") {
                        alert("error");
                    }
                    $("a", response).each(
                     function (index) {
                         $("#results").append($(this));
                      
                     }
                    );
                });


            //  $("#results").append(newFrame);
        }
        );
    }
    );

   
    </script>

