You cannot install .innerHTMLdirectly from a jQuery object. Instead, you need to install $.html().
$("#dialog").innerHTML = "This is the wrong way";
$("#dialog").html( "And this is the correct way" );
, jQuery, , . .innerHTML DOM, jQuery. jQuery , $.html(), - .innerHTML.