-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
56 lines (45 loc) · 1.42 KB
/
script.js
File metadata and controls
56 lines (45 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const card = document.getElementById("card");
card.addEventListener("mouseover", () => {
card.style.transform = "rotateY(180deg)";
});
card.addEventListener("mouseout", () => {
card.style.transform = "rotateY(0deg)";
});
var testi = $('#testimonial-slide');
var owlcarouselslide = function(e) {
// testimonial slide
testi.owlCarousel({
autoplay: false,
center: true,
loop: true,
dots: true,
touchDrag: false,
mouseDrag: false,
smartSpeed: 900,
items: 1,
margin: 100,
nav: true,
navText: [
'<i class="fa fa-long-arrow-left " aria-hidden="true"></i>',
'<i class="fa fa-long-arrow-right " aria-hidden="true"></i>'
],
navContainer: '.custom-nav',
});
};
$(document).ready(function() {
owlcarouselslide();
});
document.addEventListener('DOMContentLoaded', function () {
// Get the current page URL
const currentPage = window.location.pathname.split("/").pop();
// Select all navigation links
const navLinks = document.querySelectorAll('.nav-link');
// Loop through each link and check if its href matches the current page
navLinks.forEach(link => {
const linkPage = link.getAttribute('href');
// If the href matches the current page, add the 'active' class
if (linkPage === currentPage || (linkPage === 'index.html' && currentPage === '')) {
link.classList.add('active');
}
});
});