Initial Release
This commit is contained in:
35
assets/js/script.js
Normal file
35
assets/js/script.js
Normal file
@@ -0,0 +1,35 @@
|
||||
$(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');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user