jquery砌体-允许切换(切换到div元素后面)
我使用一个简单的切换效果jquery砌体-允许切换(切换到div元素后面),jquery,html,toggle,Jquery,Html,Toggle,我使用一个简单的切换效果 //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click $("h4.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClas
//Hide (Collapse) the toggle containers on load
$(".toggle_container").hide();
//Switch the "Open" and "Close" state per click
$("h4.trigger").toggle(function(){
$(this).addClass("active");
}, function () {
$(this).removeClass("active");
});
//Slide up and down on click
$("h4.trigger").click(function(){
$(this).next(".toggle_container").slideToggle("slow");
});
我用砖石来做div布局
我的问题是,在切换时,toggle容器隐藏在其他div后面
请看这里:
想法?我做了类似的事情,但使用setTimeout每隔50毫秒左右重新触发一次砌体调用。确切的问题是什么,它与jQuery有什么关系?如果要避免某些图元与其他图元重叠,可以使用z-index。在这种情况下,z-index不起作用,因为布局由砌体控制。由于这个问题,我决定放弃切换。