将 jQuery .dialog() 和 .datepicker() 与 z-index 一起使用
尝试在 .dialog()
中加载 .datepicker()
我正在这样做,但它似乎根本没有出现在对话框中:
$(document).ready(function(){
$("#ui-datepicker-div").css("z-index","9999 !important");
// tried this too
$(".ui-datepicker").css("z-index","9999 !important");
});
FireBug 说它仍然是
这里出了什么问题?我在没有帮助的情况下查看了这个: Trouble with jQuery Dialog and Datepicker plugins
Trying to load .datepicker()
inside a .dialog()
I'm doing this, but it doesn't seem to come up at all in the dialog:
$(document).ready(function(){
$("#ui-datepicker-div").css("z-index","9999 !important");
// tried this too
$(".ui-datepicker").css("z-index","9999 !important");
});
FireBug says it's still <div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" style="position: absolute; top: 339.4px; left: 656.4px; z-index: 2; display: block;">
when loaded.
Whats wrong here? I looked at this with no help: Trouble with jQuery Dialog and Datepicker plugins
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
控制台日志
$('#ui-datepicker-div').length
它可能不在运行时的 dom 中。如果返回 0,那么您需要将该代码适当地移动到它存在于 dom 中之后。
console log
$('#ui-datepicker-div').length
it's possible it's not in the dom at the point that's run.If that returns 0, then you'll need to move that code appropriately to after it exists in the dom.