Warak
21.01.2017, 10:40
Дело было по пьяне....
Код:
/**
* Created by Warak on 09.01.2017.
*/
$("li").click(function () {
if (!$(this).hasClass("active")) {
$("li.active").removeClass("active");
$(this).addClass("active");
}
});
($(document).ready(function () {
var chronics = {
1: "Interlude",
2: "High Five",
3: "Gracia Final",
};
function GetServers() {
$.post('/ajax/getServers').success(function (res) {
console.log(res);
function isVip(name, status, color) {
if (status === true) {
return 'VIP ' + name + '';
}
return name;
}
$.each(res, function (key, val) {
$('#tbl_' + val['type']).append('' +
'' + isVip(val['name'], val['vip'], val['vipColor']) + '' +
'' + chronics[val['chronicId']] + '' +
'X' + val['rates'] + '' +
'' + val['openDate'] + '' +
'');
});
});
}
GetServers();
$('#regClick').on('click', function () {
$('.modal-title').html('Регистрация');
$('#modalContent').load('/register');
$('#myModal').modal('show');
});
$('#about').on('click', function () {
$('.container').load('/about');
});
$('#main').on('click', function () {
});
}));
Код:
/**
* Created by Warak on 09.01.2017.
*/
$("li").click(function () {
if (!$(this).hasClass("active")) {
$("li.active").removeClass("active");
$(this).addClass("active");
}
});
($(document).ready(function () {
var chronics = {
1: "Interlude",
2: "High Five",
3: "Gracia Final",
};
function GetServers() {
$.post('/ajax/getServers').success(function (res) {
console.log(res);
function isVip(name, status, color) {
if (status === true) {
return 'VIP ' + name + '';
}
return name;
}
$.each(res, function (key, val) {
$('#tbl_' + val['type']).append('' +
'' + isVip(val['name'], val['vip'], val['vipColor']) + '' +
'' + chronics[val['chronicId']] + '' +
'X' + val['rates'] + '' +
'' + val['openDate'] + '' +
'');
});
});
}
GetServers();
$('#regClick').on('click', function () {
$('.modal-title').html('Регистрация');
$('#modalContent').load('/register');
$('#myModal').modal('show');
});
$('#about').on('click', function () {
$('.container').load('/about');
});
$('#main').on('click', function () {
});
}));