2013-04-11 39 views
0

我在下面創建一個jQuery對話框:如何設置工具提示的jQuery對話框在asp.net標題

$(document).ready(function() { 
    $('.divid').dialog({ 
     autoOpen: false, 
     draggable: true, 
     width: 720, 
     height: 560, 
     modal: true, 
     closeOnEscape: false, 
     title: "My Title", 
     open: function (type, data) { 
      $(this).parent().appendTo("form"); 
     } 
    }); 
}); 

我需要添加一個工具提示對話框的標題(設定爲「我的標題」在這個例子中)。

回答

0

你可以試試這個:

$('.divid').dialog({ 
    autoOpen: false, 
    draggable: true, 
    width: 720, 
    height: 560, 
    modal: true, 
    closeOnEscape: false, 
    title: "My Title", 
    open: function (type, data) { 
     $(this).parent().appendTo("form"); 
    } 
}).siblings('.ui-dialog-titlebar') 
    .find('.ui-dialog-title') 
    .prop('title', $('.divid').dialog("option", "title")); 

Working demo.

+0

由於科裏。有效。 – user1180773 2013-04-11 16:35:05

相關問題