Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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-->
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
135 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...