-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail.js
76 lines (72 loc) · 1.79 KB
/
detail.js
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
$(document).ready(function(){
var input = $('input'),
input_val = parseInt(input.val()),
btn_add = $('.add'),
btn_remove = $('.remove');
input.keyup(function () {
input_val = parseInt(input.val())
});
btn_add.click(function (e) {
input_val++
input.val(input_val);
});
btn_remove.click(function (e) {
if (input_val > 1) {
input_val--
}
input.val(input_val);
});
$('.slick-featured-menu').slick({
infinite: true,
autoplaySpeed: 3000,
slidesToShow: 3,
slidesToScroll: 1,
arrows: false,
dots: true,
responsive: [{
breakpoint: 1903,
settings: {
slidesToShow: 3,
slidesToScroll: 2,
infinite: true,
dots: true
}
},
{
breakpoint: 1200,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
infinite: true
}
},
{
breakpoint: 576,
settings: {
arrows: true,
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
})
function submit() {
var text = $('#my-textarea').val();
setTimeout(function () {
$('.block-comment').prepend('<div class="comment">' +
'<img src="/assets/imgs/guest-review-submit.svg" alt="khách hàng review">' +
'<div class="content-comment">' +
'<div class="name-time">' +
'<h3>Quoc Dat</h3>' +
'<p>Vừa xong</p>' +
'</div>' +
'<div class="comment-text">'+text+
'</div>'+
'</div>');
}, 300)
}
$('#submit').on('click', function(e) {
e.preventDefault();
$('html, body').animate({scrollTop:600}, '2000');
});