-
Notifications
You must be signed in to change notification settings - Fork 1
/
book.js
51 lines (46 loc) · 1.3 KB
/
book.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload=runthis;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
} else {
runthis();
}
function message(msg) {
var element = jQuery('<a>')
.html(msg)
.attr('href', '#')
.css({
width: 'auto',
opacity: 0.9,
position: 'fixed',
zIndex: 9000,
top: '15px',
right: '20px',
background: '#000',
'float': 'right',
padding: '7px 10px',
color: '#fff',
border: 'solid 2px #fff',
textDecoration: 'none',
textAlign: 'center',
font: '12px "Lucida Grande",Helvetica,Tahoma bold',
borderRadius: '5px',
MozBorderRadius: '5px',
MozBoxShadow: '0 0 20px #000',
WebkitBorderRadius: '5px',
WebkitBoxShadow: '0 0 20px #000'
})
.click(function(evt){
evt.preventDefault();
jQuery(this).fadeOut('slow', function(){jQuery(this).remove()});
})
.appendTo('body');
window.setTimeout(function(){ element.trigger('click') }, 2500);
};
function runthis() {
//$("img").hide();
//$("body").append("<div id='hola'><h1>Hola Mundo</h1></div>");
message("hola");
}