I'm trying to make an image rise to the top by clicking on it below. Once you have uploaded I want you to click (click here to close) I want you to start a 5 second countdown and then close when you finish those 5 seconds. It's kind of an advertisement. See here on the website: > > link
jQuery.cookie = function(key, value, options) {
// key and at least value given, set cookie...
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() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// key and possibly options given, get cookie...
options = value || {};
var result, decode = options.raw ? function(s) {
return s;
} : decodeURIComponent;
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1005]) : null;
};
jQuery(document).ready(function($) {
if ($.cookie('popup_facebook_box') != 'yes') {
$('#fbox-background').delay(5000).fadeIn('medium');
$('#fbox-button, #fbox-close').click(function() {
$('#fbox-background').stop().fadeOut('medium');
});
}
$.cookie('popup_facebook_box', 'yes', {
path: '/',
expires: 1
});
});
#fbox-display {
background: url(https://i.imgur.com/txK4QBP.png);
border: 0px solid gray;
padding: 1px;
width: 350px;
height: 237px;
position: fixed;
top: 32%;
left: 35%;
}
.st_font {
background: #B6000000;
color: #FFF;
padding: 5px;
font-size: 16px;
}
img#fbox-close {
position: absolute;
top: 100%;
left: 0px;
width: 350px;
height: 40px;
z-index: 2147483646;
margin: 0;
padding: 0;
cursor: pointer;
border-radius: 5px;
}
#fbox-link,
#fbox-link a.visited,
#fbox-link a,
#fbox-link a:hover {
color: #aaaaaa;
font-size: 9px;
text-decoration: none;
text-align: center;
padding: 5px;
}
#fbox-background {
display: block;
background: rgba(0, 0, 0, 0.8);
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 99999;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script><scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id='fbox-background'>
<div id='fbox-display'>
<img id="fbox-close" src="https://i.imgur.com/TdlMROf.jpg"><divclass="st_font">
<div id='fbox-button'></div>
</div>
</div>
</div>