You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1008 B
36 lines
1008 B
$(document).ready(function() {
|
|
"use strict";
|
|
// Scroll to top
|
|
$("a[href='#top']").click(function() {
|
|
$("html, body").animate({ scrollTop: 0 }, "slow");
|
|
return false;
|
|
});
|
|
|
|
// Smooth scroll
|
|
$('a.scroll-to').on('click', function (event) {
|
|
var $anchor = $(this);
|
|
$('html, body').stop().animate({
|
|
scrollTop: ($($anchor.attr('href')).offset().top - 50)
|
|
}, 700);
|
|
event.preventDefault();
|
|
});
|
|
|
|
$('.site-testimonial-item').on('mouseenter', function(){
|
|
$('.site-testimonial-item').addClass('inactive');
|
|
$(this).removeClass('inactive').addClass('active');
|
|
});
|
|
$('.site-testimonial-item').on('mouseleave', function(){
|
|
$('.site-testimonial-item').removeClass('inactive');
|
|
$('.site-testimonial-item').removeClass('active');
|
|
});
|
|
});
|
|
|
|
$(window).on('scroll', function () {
|
|
var windscroll = $(window).scrollTop();
|
|
if (windscroll >= 100) {
|
|
$('.site-navigation').addClass('nav-bg');
|
|
} else {
|
|
$('.site-navigation').removeClass('nav-bg');
|
|
}
|
|
});
|