I have the following jQuery dialog and I want to change the contents of a div inside the dialog just before I open it. However I can't seem to fathom it out, can any one help?
<div id="dialog" title="Basic dialog">
<div id="data"></div>
</div>
$("#dialog").dialog({
bgiframe: true, height: 140, modal: true, autoOpen: false
});
$("#data").html = "My new text"; /*THIS DOES NOT WORK*/
$("#dialog").dialog('open');
Thanks.