var container = document.getElementById("load_div");
var str = container.innerText;
var words = str.split(/\s/);
while (container.hasChildNodes()) {
container.removeChild(container.lastChild);
}
words.forEach(function (item,idx) {
var el = document.createElement('p');
el.setAttribute("class","chat");
el.innerText = item;
container.appendChild(el);
} )
If a cache receives a value larger than the largest positive integer it can represent, or if any of its age calculations overflows, it MUST transmit an Age header with a value of 2147483648 (2^31)
Max-Age=value
OPTIONAL. The value of the Max-Age attribute is delta-seconds,
the lifetime of the cookie in seconds, a decimal non-negative
integer. To handle cached cookies correctly, a client SHOULD
calculate the age of the cookie according to the age calculation
rules in the HTTP/1.1 specification [RFC2616]. When the age is
greater than delta-seconds seconds, the client SHOULD discard the
cookie. A value of zero means the cookie SHOULD be discarded
immediately.
document.getElementById('myhref').ontouchstart = function (event)
{
var d = new Date();
this.touchStartTime = d.getTime();
event.preventDefault();
}
document.getElementById('myhref').ontouchend = function (event)
{
var d = new Date();
if ((d.getTime() - this.touchStartTime) < 1000 ) {
this.click();
}
}
document.getElementById('mes').innerHTML += chat.value;
<?php
$ar = [
['items' => ['a', 'b', 'c']],
['items' => ['b', 'c']],
['items' => ['a']],
['items' => ['a', 'b', 'c', 'd']],
['items' => ['a']],
['items' => ['b']],
['items' => ['c']],
];
print_r(splitter($ar));
function splitter($array, $columns=3)
{
$return = array();
$per_column = intval(count($array) / $columns);
$i = 0;
$column = 0;
foreach ($array as $key => $row) {
if ($column < $columns-1) {
if ($i >= $per_column) {
$column++;
$i = 0;
}
}
$return[$column][] = $row;
$i++;
}
return $return;
}
Chart.plugins.register({
afterDatasetsDraw: function(chartInstance, easing) {
var ctx = chartInstance.chart.ctx;
chartInstance.data.datasets.forEach(function (dataset, i) {
var meta = chartInstance.getDatasetMeta(i);
if (!meta.hidden && dataset.type == 'line') {
// здесь код того что вы хотите реализовать
}
});
}
});
<span>
<span data-date="тут метка времени из базы"></span>
function getData(setter,button) {
$.ajax({
url:'../elem/search.php',
type: 'POST',
cache: false,
success : function(data) {
setter = data;
button.click();
}
})
}