bot.js
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
$(document).ready(function() {
$('.chat-questions').each(function () {
if($(this).find('.chat-questions').length) {
$(this).addClass('has-questions');
}
})
$('.chat-scroll').mCustomScrollbar(
{
theme: 'minimal'
}
)
$(document).on('click','.chat-questions div',function () {
if(!($(this).hasClass('chat-questions'))) {
if($(this).parent().parent().hasClass('chat-tabs')) {
if($(this).parent().hasClass('show')) {
$('.chat-questions').removeClass('show')
} else {
$('.chat-questions').removeClass('show')
$(this).parent().addClass('show')
}
} else {
$(this).parent().toggleClass('show')
}
}
})
$(document).on('click','.chat-start-btn span',function () {
var this_ = $(this).parent();
var index = this_.index();
var blocks = $('.chat-tabs');
this_.parent().css({display:'none'});
$(blocks[index]).fadeIn(400);
$('.chat-hidden-close .back').fadeIn(100);
})
function back() {
$('.chat-hidden-close .back').css({display:'none'});
$('.chat-tabs').css({display:'none'});
$('.chat-start-wrapp').fadeIn(400);
$('.chat-questions').removeClass('show');
}
$(document).on('click','.chat-hidden-close .back',function () {
back();
})
$(document).on('click','.chat-hidden-close .close',function () {
back();
$('.chat-wrapp').addClass('disabled');
})
$(document).on('click','.chat-ico',function () {
$('.chat-wrapp').toggleClass('disabled');
})
})