fuckyourday/Marvel/js/custom.js

37 lines
746 B
JavaScript
Raw Normal View History

2024-03-26 20:36:43 -05:00
(function ($) {
"use strict";
// COLOR MODE
$('.color-mode').click(function(){
$('.color-mode-icon').toggleClass('active')
$('body').toggleClass('dark-mode')
})
// HEADER
$(".navbar").headroom();
// PROJECT CAROUSEL
$('.owl-carousel').owlCarousel({
items: 1,
loop:true,
margin:10,
nav:true
});
// SMOOTHSCROLL
$(function() {
$('.nav-link, .custom-btn-link').on('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top - 49
}, 1000);
event.preventDefault();
});
});
// TOOLTIP
$('.social-links a').tooltip();
})(jQuery);