guongdenledthanhphat
commited on
Commit
•
4676efb
1
Parent(s):
f8d109f
Create main.js
Browse files
main.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*Slider function [It is recommended to place a function in a separate JS file, such as "functions.js"]*/
|
2 |
+
function myCoolSlider() {
|
3 |
+
$('#featured-content').slick({
|
4 |
+
dots: false,
|
5 |
+
infinite: true,
|
6 |
+
speed: 300,
|
7 |
+
slidesToShow: 4,
|
8 |
+
slidesToScroll: 4,
|
9 |
+
responsive: [{
|
10 |
+
breakpoint: 1200,
|
11 |
+
settings: {
|
12 |
+
slidesToShow: 4,
|
13 |
+
slidesToScroll: 4,
|
14 |
+
infinite: true,
|
15 |
+
dots: true
|
16 |
+
}
|
17 |
+
}, {
|
18 |
+
breakpoint: 992,
|
19 |
+
settings: {
|
20 |
+
slidesToShow: 3,
|
21 |
+
slidesToScroll: 3
|
22 |
+
}
|
23 |
+
}, {
|
24 |
+
breakpoint: 768,
|
25 |
+
settings: {
|
26 |
+
slidesToShow: 3,
|
27 |
+
slidesToScroll: 3
|
28 |
+
}
|
29 |
+
}, {
|
30 |
+
breakpoint: 480,
|
31 |
+
settings: {
|
32 |
+
slidesToShow: 2,
|
33 |
+
slidesToScroll: 2
|
34 |
+
}
|
35 |
+
}]
|
36 |
+
});
|
37 |
+
}
|
38 |
+
/*End of Slider function*/
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
$(document).ready(function() {
|
43 |
+
|
44 |
+
|
45 |
+
/*Calling the function [It is recommended to call a function in a separate JS file, such as "scripts.js"]*/
|
46 |
+
myCoolSlider();
|
47 |
+
/*.................End of call*/
|
48 |
+
|
49 |
+
|
50 |
+
});
|