当前位置:K88软件开发文章中心编程语言JavaScriptJS02 → 文章内容

jQuery UI 通过部件库(Widget Factory)扩展小部件

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-11 6:08:35

为。为了做到这点,您需要使用正常的 JavaScript 属性分配,获得对实例的引用,并重载该方法。具体如下面实例所示。var dialogInstance = $( "<div>" ) .dialog() // Retrieve the dialog's instance and store it. .data( "ui-dialog" ); // Override the close() method for this dialogdialogInstance.close = function() { console.log( "close" );}; // Create a second dialog$( "<div>" ).dialog(); // Select both dialogs and call close() on each of them.// "close" will only be logged once.$( ":





data(ui-dialog)" ).dialog( "close" );个性化实例的重载方法技术是完美的一次性定制。

上一页  [1] [2] 


jQuery UI 通过部件库(Widget Factory)扩展小部件