first commit
This commit is contained in:
5
js/jquery.min.js
vendored
Normal file
5
js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
76
js/main.js
Normal file
76
js/main.js
Normal file
@@ -0,0 +1,76 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
/* Navigation burger onclick side navigation show */
|
||||
$('.burger-container').on('click', function() {
|
||||
$('.main-navigation').toggle('slow');
|
||||
|
||||
if($('#myBtn').hasClass('change')) {
|
||||
$('body').addClass('stop-scroll');
|
||||
} else {
|
||||
$('body').removeClass('stop-scroll');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* About me slider */
|
||||
$('.about-me-slider').slick({
|
||||
slidesToShow: 1,
|
||||
prevArrow: '<span class="span-arrow slick-prev"><</span>',
|
||||
nextArrow: '<span class="span-arrow slick-next">></span>'
|
||||
});
|
||||
|
||||
/* Blog slider */
|
||||
$('.blog-slider').slick({
|
||||
slidesToShow: 2,
|
||||
prevArrow: '<span class="span-arrow slick-prev"><</span>',
|
||||
nextArrow: '<span class="span-arrow slick-next">></span>',
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var counta = 0;
|
||||
|
||||
$(window).scroll(function(e){
|
||||
|
||||
|
||||
/* Onscroll number counter */
|
||||
var statisticNumbers = $('.single-count');
|
||||
if(statisticNumbers.length) {
|
||||
var oTop = statisticNumbers.offset().top - window.innerHeight;
|
||||
if (counta == 0 && $(window).scrollTop() > oTop) {
|
||||
$('.count').each(function() {
|
||||
var $this = $(this),
|
||||
countTo = $this.attr('data-count');
|
||||
$({
|
||||
countNum: $this.text()
|
||||
}).animate({
|
||||
countNum: countTo
|
||||
},
|
||||
|
||||
{
|
||||
duration: 2000,
|
||||
easing: 'swing',
|
||||
step: function() {
|
||||
$this.text(Math.floor(this.countNum));
|
||||
},
|
||||
complete: function() {
|
||||
$this.text(this.countNum);
|
||||
}
|
||||
});
|
||||
});
|
||||
counta = 1;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
1
js/slick.min.js
vendored
Normal file
1
js/slick.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user