在以下代码中启动'启动pup up窗口, 我会做的是在点击链接时抛出它而我不知道该怎么做,你有想法吗?
CSS3代码:
<style>
#pageplugin{display:none;background:url(https://lh5.googleusercontent.com/-NsuP8OcOhDM/VH7RiGS6LpI/AAAAAAAAqVk/Itt6IoIgPzQ/s800/sfondo.png);
width:100%;
height:100%;
position:fixed;
top:0;
left:0;
z-index:999999;
}
#page_plugin_exit{
width:100%;
height:100%;
}
#pg_plugin{
background:#fff;
width:420px;
height:270px;
position:absolute;
top:50%;
left:50%;-webkit-box-shadow:inset 0 0 50px 0 #939393;
-moz-box-shadow:inset 0 0 50px 0 #939393;
box-shadow:inset 0 0 50px 0 #939393;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
margin:-135px 0 0 -210px;
}
#pg_close{
float:right;
cursor:pointer;
background:url(https://lh6.googleusercontent.com/-7q7oU2yspzA/VH7T00YAmHI/AAAAAAAAqVw/3J_XdnqBvmY/s56/close.png)repeat;
height:15px;
padding:20px;
position:relative;
padding-right:40px;
margin-top:-20px;
margin-right:-22px;
}
.pg_border{
height:1px;
width:400px;
margin:0 auto;
background:#F3F3F3;
margin-top:16px;
position:relative;
margin-left:20px;
}
</style>
SCCRIPT CODE:
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
<script type="text/javascript">
jQuery.cookie = function (key, value, options) {
if (arguments.length > 1 && String(value) !== "[object Object]") {
options = jQuery.extend({}, options);
if (value === null || value === undefined) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires,
t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=',
options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '',
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''].join(''));
}
options = value || {};
var result, decode = options.raw ? function (s) {
return s;
} : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));
jQuery(document).ready(function ($) {
if ($.cookie('popup_user_login') != 'yes') {
$('#pageplugin').delay(100).fadeIn('medium');
$('#pg_close, #page_plugin_exit').click(function () {
$('#pageplugin').stop().fadeOut('medium')
})
}
$.cookie('popup_user_login', 'yes', { path: '/', expires: 0 })
});
</script>
HTML CODE
<div id="pageplugin">
<div id="page_plugin_exit"></div>
<div id="pg_plugin">
<div id="pg_close"></div>
<div class="pg_border"></div>
<div id="fb-root"></div>
<div>
<img src="img/naveicona.png" />
Name boath
</div>
</div>
</div>