设置jquery-ui datepicker的z-index值

如何置jquery-ui datepicker的z-index值的呢?

分析datepicker的源码,发现弹出的日期选择框的z-index值是:$(input).zIndex() + 1。继续分析$.zIndex()函数(在jquery-ui.js文件中),发现当input的css position值为absolute、fixed或relative时,$.zIndex()函数返回的值就是input css 的z-index值。

例如:<input type="text" name="add_date" id="add_date" style="z-index:1000;position:relative;" value="" />这样设置时,弹出的jquery-ui datepicker日期选择框的z-index值就设置为1001了。

posted on 2013-12-23 14:40  ayao  阅读(5574)  评论(0编辑  收藏  举报

导航