首页 新闻 赞助 找找看

blockUI 怎么遮挡指定 div

0
悬赏园豆:10 [已解决问题] 解决于 2012-06-08 09:57

他丫丫的,不行。该怎么写,只遮挡指定 div。目前只能整个页面遮挡,先睡了,明天再说~

附代码片段:

$.ajax({
type: "POST",
url: "Ajax/ItemHandler.ashx",
data: "Page=" + Page,
beforeSend: function () {
$('#my_div').blockUI();
},

<div id="my_div" style="width: 100%; min-height: 280px;">
<table class="mytable" id="TableItemList" width="700px">

日暮青色的主页 日暮青色 | 菜鸟二级 | 园豆:473
提问于:2012-06-08 01:20
< >
分享
最佳答案
-1

哎  

这是官网的示例

// use a different message 
$.blockUI({ message: 'Hold on!' }); 
 
... 
 
// use a different message 
$('#myDiv').block({ message: 'Processing...' }); 


UI两个单词看歪了!!
日暮青色 | 菜鸟二级 |园豆:473 | 2012-06-08 09:56
其他回答(1)
0
<!DOCTYPE html>
<html>
<head>
  <style>
p { margin-left:10px; color:blue; width:200px; 
    cursor:pointer; }
span { color:red; cursor:pointer; }
div.abs { width:50px; height:50px; position:absolute;
          left:220px; top:35px; background-color:green; 
          cursor:pointer; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
  <div id="result">Click an element.</div>
<p>
  This is the best way to <span>find</span> an offset.
</p>

<div class="abs">
</div>
  
<script>
$("*", document.body).click(function (e) {
  var offset = $(this).offset();
  e.stopPropagation();
  $("#result").text(this.tagName + " coords ( " + offset.left + ", " +
                                  offset.top + " )");
});

</script>

</body>
</html>

http://api.jquery.com/offset/

改造一下。

收获园豆:10
悟行 | 园豆:12559 (专家六级) | 2012-06-08 09:08
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册