blob: 50c06acb10be238d5b327f56d826056591e56dd0 (
plain)
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
|
$(document).ready (function () {
$('#algo').DataTable ({
paging: false,
"columnDefs": [],
});
$('#algo tr').click (function () {
var data = $(this).data ('proto');
$('#popup h2').text (data.name);
$('#popup .longname').text (data.longname);
$('#popup .title').text (data.title);
$('#popup .year').text (data.year);
$('#popup .doi').text ('doi:' + data.doi);
$('#popup .doi').attr ('href', 'http://doi.org/' + data.doi);
$('#popup .scholar').attr ('href', 'http://scholar.google.com/scholar?q=' + encodeURIComponent (data.title));
$('#popup .description').text (data.description);
$('#popup').fadeIn ('normal');
$('#background').fadeIn ('normal');
});
/* hide popup window */
function hide () {
$('#popup').fadeOut ('normal');
$('#background').fadeOut ('normal');
}
$('#background').click (function () {
hide ();
});
$(document).keyup (function (e) {
if (e.keyCode == 27) {
hide ();
}
});
});
|