If you intend to work with returned elements, you must do this in the callback function because the HTML extraction is performed asynchronously and the callback function is executed when the request is completed and the elements are entered into the DOM:
var id = 'test';
$('#loader').load("Views/chatBox.html", function () {
$('span.bn', this).text(id);
});
, clonning #loader, DOM, , , ...