-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·45 lines (32 loc) · 1.12 KB
/
script.js
File metadata and controls
executable file
·45 lines (32 loc) · 1.12 KB
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
$(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */
/* The number of event sections / years with events */
$('.eventList li').click(function(e){
showWindow('<div>'+$(this).find('div.content').html()+'</div>');
});
});
function showWindow(data)
{
/* Each event contains a set of hidden divs that hold
additional information about the event: */
var title = $('.title',data).text();
var date = $('.date',data).text();
var body = $('.body',data).html();
$('<div id="overlay">').css({
width:$(document).width(),
height:$(document).height(),
opacity:0.6
}).appendTo('body').click(function(){
$(this).remove();
$('#windowBox').remove();
});
$('body').append('<div id="windowBox"><div id="titleDiv">'+title+'</div>'+body+'<div id="date">'+date+'</div></div>');
$('#windowBox').css({
width:500,
height:350,
//left: (window.event.clientX - 500)/2,
//top: (window.event.clientY - 350)/2
left: event.clientX + document.body.scrollLeft,
top: event.clientY + document.body.scrollTop - 175
});
}