jQuery ui dialog change title after load-callback

后端 未结 5 1148
不知归路
不知归路 2020-12-13 05:09

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

5条回答
  •  旧时难觅i
    2020-12-13 05:51

    Using dialog methods:

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

    Or directly, hacky though:

    $("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

提交回复
热议问题