Jquery expose overlay function

主宰稳场 提交于 2020-01-07 08:22:05

问题


This function is not working, the popup (div #pop_member) doesn't show.

I'm using jQuery Tools library.

function run_expire(){
  $("#pop_member").overlay({
    expose: {
        color: '#212121',
        loadSpeed: 200,
        opacity: 0.9
    },
    closeOnClick: false
  });
}
run_expire();

I want this popup to show when the page is loaded:

<div class="simple_overlay" id="pop_member">
<div class="details">
  <h4>Member Admin Login Area</h4>
  <p>Sign in below to edit your personal and business information.</p>

  </div><!--details-->
</div><!--simple_overlay-->

回答1:


You need to do this:

$(function() {
  $("#pop_member").overlay({
    expose: {
        color: '#212121',
        loadSpeed: 200,
        opacity: 0.9
    },
    closeOnClick: false,
    api: true  //ADDED api:true
  }).load();   //ADDED .load()
});

I got that from the code here.




回答2:


Does your page validate? Be sure it validates first because that fixes many issues.



来源:https://stackoverflow.com/questions/1452517/jquery-expose-overlay-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!