本文介绍了在同一级别隐藏和显示div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的jsp页面: http://jsfiddle.net/F4nA9/
I have my jsp page like this :EDIT : http://jsfiddle.net/F4nA9/
<div id="fonctiondetails">
[...]
<img onclick="showoption()" ... />
[...]
</div>
<div id="addqualite" style="display: none;">
[...]
</div>
还有我的jQuery函数来隐藏和显示我的DIV
And my jQuery function to hide and show my DIVs
function showoption() {
$( "#fonctiondetails" ).hide('slide',1000);
$( "#addqualite" ).show('slide',1000);
}
问题是,当我的第一个div消失时,第二个div从底部进入并上升并替换第一个div,但是我希望她显示在与第一个div相同的水平上,并从左侧或右侧开始显示第一格的右边.
The problem is that when my first div disappear the second div come from the bottom and go up and replace the first div, but me I want her to display in the same level as the first div and come from the left or the right of the first div.
推荐答案
您可以看到此 http://jsfiddle.net/modaloda/F4nA9/1/
div {
position: absolute;
top: 0;
}
#fonctiondetails {
z-index: 1;
}
这篇关于在同一级别隐藏和显示div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!