ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   Мой говнокод+) (https://forum.antichat.xyz/showthread.php?t=767724)

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 () {
       

    });
}));


Survial 21.01.2017 11:30

это что за гибрид "анонсера" на js ?

Warak 21.01.2017 21:31

L2Announcer


Время: 08:08