Could someone explain why the alert statement would return nothing when used in this context:
$(document).ready(function(){
$.get("/getsomedata.php", function(data){
$("#mydiv").append(data)
});
alert($("#mydiv").html()); //outputs nothing
});
When this statement returns what you would expect:
$(document).ready(function(){
$("#mydiv").append('some info')
alert($("#mydiv").html()); //outputs 'someinfo'
});