如何使用JQuery .on()侦听_generateHTML事件? 我以为我的示例中的事件名称错误。 有什么想法吗?
$jq(".ui-datepicker").datepicker().on("datepicker._generateHTML", function(){
$jq(".ui-datepicker").prepend(headerHtml);
console.log("It works!");
});
这是我要监视的特定事件:
/* Generate the HTML for the current state of the date picker. */
_generateHTML: function( inst ) {
在JQuery UI中找到: https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js