Jquery 日期选择器 z-index 问题 [英] Jquery date picker z-index issue

查看:20
本文介绍了Jquery 日期选择器 z-index 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个幻灯片 div,我在该 div 上方有一个日期选择器字段.

I have a slideshow div, and I have a datepicker field above that div.

当我点击日期选择器字段时,日期选择器面板显示在幻灯片 div 后面.

When I click in the datepicker field, the datepicker panel show behind slideshow div.

我把脚本写成:

http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js

所以我无法在 CSS 中更改 datepicker 的 z-index.脚本生成的日期选择器的 z-index 是 1,而我的幻灯片 div(也通过 googleajaxapi 调用)z-index 是 5.所以我想我必须将日期选择器的 z-index 增加到大于 5.所以有吗有什么办法增加吗?

So I cannot change the z-index of datepicker in CSS. The z-index of datepicker which the script is generating is 1 and my slideshow div(also calling thru googleajaxapi) z-index is 5. So I guess I have to increase the z-index of date picker greater than 5. So is there any way to increase it ?

有人可以帮助我吗?

推荐答案

在'input'文本元素处添加如下样式:position: relative;z-index: 100000;.

Put the following style at the 'input' text element: position: relative; z-index: 100000;.

datepicker div 从输入中获取 z-index,但这仅适用于相对位置.

The datepicker div takes the z-index from the input, but this works only if the position is relative.

使用这种方式,您不必从 jQuery UI 修改任何 javascript.

Using this way you don't have to modify any javascript from jQuery UI.

这篇关于Jquery 日期选择器 z-index 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆