Jquery BlockUI元素阻塞 [英] Jquery BlockUI element blocking

查看:148
本文介绍了Jquery BlockUI元素阻塞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图阻止该页面的某些部分。我正在关注 http:// jquery。 malsup.com/block/#element 教程,但我无法映射元素。

I am trying to block certain part of the page.I am following the http://jquery.malsup.com/block/#element tutorial, but i am not able to map the element .

我的js:

 $('div.repoDisplay').blockUI({ message: '' ,overlayCSS: { backgroundColor: '#fff'   }});

我的html:

  <div class="container-sc" style="display: table;">
   <div id='repoDisplay' >
    <div style="display: table-cell;width:150px">
     \\\\\\\\\\\
      </div>
   </div>


   <div style="display: table-cell;padding:10px;width:85%"">
   {{outlet}}             
   </div>

</div>

但它显示未被捕获的类型错误:在我的js中未定义。

But it is showing uncaught type error:undefined in my js.

感谢您的帮助

推荐答案

$ .blockUI()用于阻止整个页面,如果要阻止元素部分,则使用 block()仅限功能,并使用右< selector> repoDisplay是 id 所以你需要使用,见下面的代码

$.blockUI() is using to block whole page, If you want to block element section then use block() function only, and use right <selector> repoDisplay is id so you need to use with #, see below code

$('div#repoDisplay').block({
    message: '' ,
    overlayCSS: { backgroundColor: '#fff'   }
 });

FIDDLE演示

这篇关于Jquery BlockUI元素阻塞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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