let pressed = false;
item.addEventListener("pointerdown", function () {
pressed = true; // регистрируем нажатие
});
document.addEventListener("pointerup", function () {
pressed = false; // убираем нажатие
});
function highlightcurrent(items, index)
{
if(index != 2) // выходим из функции, если достигли определенного индекса
{
items.removeClass("highlightcurrent");
items.eq(index).addClass('highlight');
items.eq(index).addClass('highlightcurrent');
setTimeout(function()
{
highlightcurrent(items, index + 1)
}, 1000);
}
}
highlightcurrent($('.progress-page-tabs-col'), 0);
/*
* Returns an array of jQuery objects, grouped by specified number of elements.
*
* Say you have 17 <frameset> tags on your page...
*
* $('frameset').inGroupsOf(7); // => [ jQuery[0..6], jQuery[7..13], jQuery[14..16] ]
*
*/
$.fn.inGroupsOf = function( countPerGroup ) {
var groups = [], offset = 0, $group;
while ( ($group = this.slice( offset, (countPerGroup + offset) )).length ) {
groups.push( $group );
offset += countPerGroup;
}
return groups;
};
Это поведение чата задается в разделе "Автоматические действия" настроек сайта, в личном кабинете.
Если вам не нужна функция открытия чата, то вы можете отключить действие "Активное приглашение в диалог".
Для вызова окна чата вы можете использовать методjivo_api.open();
При вызове данного метода откроется основное окно чата.
Пример кода:<a href="#" onclick="jivo_api.open();">Открыть чат</a>
$(document).ready(function () {
$("body").on('click', '#send_button', function () {
//Ваш код
$(this).removeAttr("id");
});
});