content

Gets or set the content of a dialog. Supports chaining when used as a setter.

Parameters

content String|jQuery (optional)

The content of the Dialog. Can be an HTML string or jQuery object.

Returns

String The current dialog content, if used as a getter. If used as a setter, the method will return the dialog object to support chaining.

Example - get the dialog content

<div id="dialog">foo</div>
<script>
$("#dialog").kendoDialog({
  title: "Kendo Dialog Component",
});
var dialog = $("#dialog").data("kendoDialog");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dialog.content()); // logs "foo"
</script>

Example - set the dialog content

<div id="dialog"></div>
<script>
$("#dialog").kendoDialog({
  title: "Kendo Dialog Component"
});
var dialog = $("#dialog").data("kendoDialog");
dialog.content("Kendo UI all the things!");
</script>
In this article