title String (optional)

Gets or sets the title of a Dialog. Can be a text string. Supports chaining when used as a setter. If passed to the method, an HTML string would be escaped.

Parameters

text String (optional)

The title of the Dialog.

Returns

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

Example - get the title of the dialog

<div id="dialog"></div>
<script>
$("#dialog").kendoDialog({
  title: "Kendo Dialog Component",
  content: "This is your Kendo Dialog.",
});
var dialog = $("#dialog").data("kendoDialog");
var title = dialog.title();
</script>

Example - set the title of a dialog

<div id="dialog"></div>
<script>
$("#dialog").kendoDialog({
  content: "This is your Kendo Dialog."
});
var dialog = $("#dialog").data("kendoDialog");
dialog.title("Hello");
</script>
In this article