问题
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