加载回调后jQuery ui对话框更改标题 [英] jQuery ui dialog change title after load-callback

查看:30
本文介绍了加载回调后jQuery ui对话框更改标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢在此 UI 对话框中提交表单后更改 UI 对话框的标题.因此,在 load 之后的回调函数中,我应该建议,但我已经尝试并在 google 上搜索没有结果.

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.

有人有想法吗?

推荐答案

使用对话框方法:

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

或者直接,hacky:

Or directly, hacky though:

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

为了将来参考,您可以使用 jQuery 跳过 google.大多数情况下,jQuery API 将回答您的问题.在这种情况下,对话框 API 页面.对于主库:http://api.jquery.com

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 ui对话框更改标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆