/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ var events = $('.timeline'); function getEvents() { $.post('https://panelaseto.pl/api/events/ajax.php?token=44de4f521b8633246c3e7552d20440f0ca99bd2ca0f78b193430ebd3f460c703', { action: 'getEvents' }).done(function(response, textStatus, jqXHR) { data = JSON.parse(response); if(data.status) { var count = 0; $.each(data.data, function(key, value) { if(count % 2 === 0) { $(events).append('