I was wondering hwo to make function .load() without append in some selector

For example I'd like to get variables as array from another file which I did thanks to script below.
But I have to append it on #selector to retrieve information I want to get.
Is there any way to get those information without creating this selector.
Of course i can "display: none;" this selector. But I would like to have clean code.

Any ideas would be appreciate :))

```
$("#selector").load('content/file.php', function (result) {
    var hrefs = new Array();
    $("ul li").each(function () {
        hrefs.push($(this).find('a').attr('href'));
    });
});

```