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

查看:77
本文介绍了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天全站免登陆