$(document).ready(function() {
$('.tCo').each(function(index) {
var TBL = $(this);
var KEY = '';
$.getJSON('/res/json/json.get.key.html?d='+TBL.data('d'), function( data ) {
if (data.key) {
$.getJSON( '/res/json/json.ban.list.for.country.html?KAZRaOkG='+data.key+'&c='+TBL.data('c')+'&d='+TBL.data('d'), function( data ) {
TBL.html('');
var TR = $('
', {'class':'ban_row'});
if (!data.error) {
if (data.info) {
TR = $('
');
TR.append($('', {
'class':'collapsing',
'html': ' In the coming days there are no general traffic bans for trucks. Check if there are no partial traffic bans by reviewing detailed country informations. '
}));
TBL.append(TR);
} else {
$.each( data, function( key, val ) {
TR = $(' |
');
TR.append($('', {'class':'collapsing', 'html': ''}));
TR.append($(' | ', {'html': val.bd}));
TR.append($(' | ', {'class':'collapsing', 'html': val.tm}));
if (val.al==1) {
var IMPORTANT = $('', {'class':'red exclamation triangle icon tooltip', 'data-content':'must-read!'});
IMPORTANT.popup();
TR.append($(' | ', {'class':'collapsing', 'html': IMPORTANT}));
} else {
TR.append($(' | '));
}
TR.append($(' | ', {
'class':'collapsing',
'html': ''
+' '
+' '}));
TBL.append(TR);
});
}
}
});
}
});
});
});
|