[英]Blank Button in Jquery UI Dialog
I am trying to make a popup dialog form with jQuery UI, but the buttons that are generated do not have any text in them. 我正在尝试使用jQuery UI创建弹出对话框,但是所生成的按钮中没有任何文本。
$(function(){
$( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
resizable: false,
buttons: {
"OK": function() {
alert("test");
$( this ).dialog( "close" );
}
}
});
The code of the generated button is this: 生成的按钮的代码是这样的:
<div class="ui-dialog-buttonset">
<button type="button" text="OK" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
<span class="ui-button-text"/>
</button>
</div>
Also, the code of the button handler is executed when the page loads, which means I see the "test" popup when i load the page 另外,在页面加载时执行按钮处理程序的代码,这意味着我在加载页面时看到“测试”弹出窗口
I'm using jQuery and jQuery UI loaded by the Google API 我正在使用Google API加载的jQuery和jQuery UI
Silly me! 傻我! I was using an older version of jQuery (1.3.2) which should be fully compatible with jQuery UI, but I guess not. 我使用的是旧版本的jQuery(1.3.2),该版本应与jQuery UI完全兼容,但我猜不是。 Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.