jQuery ui dialog change title after load-callback

后端 未结 5 1143
不知归路
不知归路 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条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 05:55

    I have found simpler solution:

    $('#clickToCreate').live('click', function() {
         $('#yourDialogId')
             .dialog({
                  title: "Set the title to Create"
             })
             .dialog('open'); 
    });
    
    
    $('#clickToEdit').live('click', function() {
         $('#yourDialogId')
             .dialog({
                  title: "Set the title To Edit"
             })
             .dialog('open'); 
    });
    

    Hope that helps!

提交回复
热议问题