Why can't i access newly loaded DOM elements in the .load() callback function?
<p>I'm pretty new to JavaScript and jQuery, so i think i have some sort of misunderstanding of how this stuff is supposed to work. What i do is load some html via .load(), then i call a previously defined function as the callback function. This function is not doing the same as when i define it directly in place:  </p>

<pre><code>$(document).ready(function(){
$('#playerslot').html( '' ).load('player/',function(){
        $('#new_element').replaceWith('Hello World!')
    });
});  
</code></pre>

<p>The code above works, while this one does not:  </p>

<pre><code>function hello(){
    $('#new_element').replaceWith('Hello World!')
});
$(document).ready(function(){
    $('#playerslot').html( '' ).load('player/',hello());
});  
</code></pre>

<p>Why not?</p>
