2015-02-08 51 views
1

我希望能夠「解鎖」應用了.block()的div。我怎樣才能做到這一點?如何取消阻塞應用了.block()的嵌套div

下面是一些代碼要更清楚。

<div id='outer' style="width:300;height:300;background-color:black"> 
<div id= 'inner'> 
    <a href=#>I want to be able to click this </a> 
</div> 

But nothing else in the "outer" div. <button> 
</div> 

<script> 
$('#outer').block(); 
</script> 

enter image description here

+0

你介意提供[示例](http://jsfiddle.net)? – 2015-02-08 23:36:42

+0

@JoshCrozier提供的例子! – 2015-02-08 23:56:09

回答

1

jQuery的BlockUI當它被阻塞增加了一個覆蓋所述元件的內部。例如:

<div class="blockUI blockOverlay" style="z-index: 1000; border: none; margin: 0px; padding: 0px; width: 100%; height: 100%; top: 0px; left: 0px; opacity: 0.6; cursor: wait; position: absolute; background-color: rgb(0, 0, 0);"></div> 

因此,如果你想要的內容之一是暢通的,你需要增加它的z-index,使其出現以上的BlockUI覆蓋。

你可以添加一個類的元素:

Example Here

.unblockable { 
    z-index: 55555; 
    position: relative; 
} 
+0

Awesome.thanks。 – 2015-02-09 02:46:32