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();
var dialog = $("#dialog").data("kendoDialog");
console.log(dialog.content()); // logs "foo"
</script>

Example - set the dialog content

<div id="dialog"></div>
<script>
$("#dialog").kendoDialog();
var dialog = $("#dialog").data("kendoDialog");
dialog.content("Kendo UI all the things!");
</script>
In this article
Not finding the help you need?