I like to change the title from an UI Dialog after i have submitted a form in this UI Dialog. So in the callback-function after load i should suggest, but i've tried and googled without result.

Has anyone an idea?

推荐答案

Using dialog methods:

$('.selectorUsedToCreateTheDialog').dialog('option', 'title', 'My New title');

不过,也可以直接地、粗鲁地说:

$("span.ui-dialog-title").text('My New Title'); 

For future reference, you can skip google with jQuery. The jQuery API will answer your questions most of the time. In this case, the Dialog API page. For the main library: http://api.jquery.com

Jquery相关问答推荐

当我使用 OwlCarousel 时,没有任何显示

多个 AJAX 调用;获取所有失败的呼叫

如果链接包含多个关键字,jQuery 将 HTML 添加到链接

使用 jQuery / javascript 测试链接是否是外部的?

jQuery 中的 $this 与 $(this)

在 HTML 表单提交上制作 Enter 键而不是激活按钮

我可以限制 JavaScript 中数组的长度吗?

将返回的 JSON 对象属性转换为(较低的第一个)camelCase

判断元素是否为 div

addClass - 可以在同一个 div 上添加多个类吗?

Twitter Bootstrap css 类的 jQuery show() 隐藏

如何清除/重置 jQuery UI Datepicker 日历上的选定日期?

带有 jQ​​uery 的饼图

带有回调ajax json的jQuery自动完成

我可以通过 JavaScript 禁用 CSS :hover 效果吗?

单击时平滑滚动到特定的 div

jQuery 发送字符串作为 POST 参数

如何以编程方式触发 ngClick

什么时候应该使用 jQuery 的 document.ready 函数?

fancybox2 / fancybox 导致页面跳转到顶部