gpt4 book ai didi

javascript - jQuery UI 1.9.1 和 jQuery 1.9.1 在对话框按钮中不显示任何文本

转载 作者:行者123 更新时间:2023-12-03 04:35:25 25 4
gpt4 key购买 nike

由于某种原因,正在显示的模式未显示所需的文本。

我像这样设置按钮:

buttons: {
"Update": function() {
}
}

我尝试过设置:

 if ( $.attrFn ) { $.attrFn.text = true; }

这个问题提到了( jQuery UI 1.8.22 with jQuery 1.8 doesn't have text in dialog buttons )但是,这也不起作用。

模态按钮如下所示:

enter image description here

DOM 元素如下所示:

 <button type="button" text="Update" 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"></span>
</button>

如您所见,text="Update" 已设置。所以它知道应该设置什么,但是跨度是空的。

有什么建议吗?

最佳答案

只需在调用模式后添加此内容

 // Dirty Fix, remove when better answer from Stack Overflow

$('.ui-button-text').each(function(i){
$(this).html($(this).parent().attr('text'))
});

恐怕我无法为您提供解决方案来解释为什么会发生这种情况。你应该找到一个并替换这个黑客。

和平

关于javascript - jQuery UI 1.9.1 和 jQuery 1.9.1 在对话框按钮中不显示任何文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43321552/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com