Question

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-->
Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top