0
0
mirror of https://github.com/lipis/flag-icons.git synced 2024-11-25 13:29:24 +01:00
flags/assets/docs.js

14 lines
430 B
JavaScript
Raw Normal View History

2013-09-27 00:40:54 +02:00
window.onload = function () {
2015-08-31 03:07:13 +02:00
$('.all-flags .flag-icon-background').click(function(event){
var flag = $(event.currentTarget).attr('title');
var w = 640;
var h = 480;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
if (flag) {
2015-08-31 03:09:26 +02:00
window.open('flags/4x3/' + flag + '.svg', 'flag-4x3', 'width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
2015-08-31 03:07:13 +02:00
}
});
2013-09-27 00:40:54 +02:00
}