JSFiddle - React, Tailwind, and code Playground
by chayacooper
HTML
<script src="jquery.fancybox.js"></script>
<link rel="stylesheet" href="jquery.fancybox.css">
<?php
$_SESSION['SESS_USER_ID'] = 200;
$logged_in = (isset($_SESSION['SESS_USER_IDs']));
?>
<div><a class="fancybox" href="http://fancyapps.com/fancybox/demo/1_b.jpg" >Create A Comprehensive Profile</a></div>
<div id="notice" style="display:none">
<span style="display: block;" class="cookie-close-button" onclick="close_field('notice')"> X</span><div class="cookie-trans"></div>
<p class="notice_header">Notice to our users…</p><p>We'd like to let you know that this site uses cookies and JavaScript. Without them you may find this site does not work properly and many features may be unavailable. Information on cookies and Active Scripting and how to enable them can be found
<a href="JavaScript:newPopup('terms.html#cookies');" onclick="close_field('notice')">here</a>. </p>
</div>
CSS
div#notice {
bottom: 0;
left: 50%;
margin: 0 0 0 -460px;
padding: 5px 10px 5px 10px;
position: fixed;
text-align: left;
width: 900px;
z-index: 10000;
color: white;
}
div#notice .cookie-trans {
background: none repeat scroll 0 0 #000000;
border: 1px solid #000000;
border-bottom: 0;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
-ms-border-radius-topleft: 5px;
-ms-border-radius-topright: 5px;
-o-border-radius-topleft: 5px;
-o-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
height: 100%;
filter: alpha(opacity = 90);
opacity: 0.9;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
div#notice p.notice_header {
font-family: DINWeb,Verdana,sans-serif;
font-size: 20px;
font-weight: 100;
background: none;
padding: 0px;
margin: 0px 0px 5px 0px;
color: white;
}
div#notice p,
div#notice p a {
font-family: Lucida Sans Unicode,Lucida Grande,Arial,sans-serif;
font-size: 12px;
font-weight: 100;
margin: 0;
padding: 0;
}
div#notice p a {
text-decoration: underline;
color: White;
}
div#notice .cookie-close-button {
float: right;
color:White;
font-weight:bolder;
font-size:9.5pt;
cursor:pointer;
}
JavaScript
<?php if ($logged_in) : ?>
parent.$('#notice').hide();
<?php else : ?>
parent.$('#notice').show();
<?php endif; ?>
$(function() {
$(".fancybox").fancybox({
type: 'iframe',
padding: 0,
scrolling: 'no',
width: 840,
minHeight: 150,
height: 615,
helpers: {
overlay: {
closeClick: false,
css: {
'background': 'rgba(153, 153, 153, 0.85)'
}
},
},
afterClose: function() {
parent.close_field('notice');
}
});
});