$(window).scroll(function()
{
var scroll = $(window).scrollTop();
if (scroll >= 50)
{
$(".desktopmenu").addClass("darkHeader");
}
else
{
$(".desktopmenu").removeClass("darkHeader");
}
});
// testimonials slider
$('.testimonialslider').owlCarousel({
loop:true,
nav:false,
dots:true,
margin:20,
stagePadding: 0,
autoplay: true,
autoPlaySpeed: 300,
autoPlayTimeout: 600,
responsiveClass:true,
responsive:{
0:{
items:1,
},
600:{
items:1,
},
1000:{
items:2,
loop:false
}
}
})
// portfolio-mobile-slider
$('.portfolio-mobile-slider').owlCarousel({
loop:true,
nav:false,
dots:true,
margin:50,
stagePadding: 0,
autoplay: true,
autoPlaySpeed: 300,
autoPlayTimeout: 600,
responsiveClass:true,
responsive:{
0:{
items:1,
},
600:{
items:1,
},
1000:{
items:2,
loop:false
}
}
})
// illustration-slider
$('.illustration-slider').owlCarousel({
loop: true,
nav: false,
dots: true,
margin: 50,
animateIn: 'fadeIn',
animateOut: 'fadeOut',
stagePadding: 0,
autoplay: true,
autoplayTimeout: 3000,
responsiveClass: true,
responsive: {
0: {
items: 1,
},
600: {
items: 2,
},
1000: {
items: 3
}
}
});
// logos slider
$('.logoslider').owlCarousel({
loop:true,
nav:false,
dots:false,
margin:10,
autoplay: true,
autoPlaySpeed: 300,
autoPlayTimeout: 600,
responsiveClass:true,
responsive:{
0:{
items:2,
},
600:{
items:2,
},
1000:{
items:6,
loop:false
}
}
})
// buildingidentity-slider
$('.buildingidentity-slider').owlCarousel({
loop:true,
nav:false,
dots:false,
margin:10,
autoplay: true,
autoPlaySpeed: 300,
autoPlayTimeout: 600,
responsiveClass:true,
responsive:{
0:{
items:1,
},
600:{
items:2,
},
1000:{
items:6,
loop:false
}
}
})
// back to top button
var btn = $('#button');
$(window).scroll(function()
{
if ($(window).scrollTop() > 300)
{
btn.addClass('show');
} else {
btn.removeClass('show');
}
});
btn.on('click', function(e)
{
e.preventDefault();
$('html, body').animate({scrollTop:0}, '300');
});
// why choose tabs with content
document.addEventListener("DOMContentLoaded", function() {
const collapsibleButtons = document.querySelectorAll(".collapsible1");
const vcontents = document.querySelectorAll(".vcontent");
// Hide all vcontents except the first one
for (let i = 1; i < vcontents.length; i++) {
vcontents[i].style.display = "none";
}
// Add click event listener to each tab button
collapsibleButtons.forEach(button => {
button.addEventListener("click", function() {
const currentVContent = this.nextElementSibling;
// Toggle display of the currentVContent
if (currentVContent.style.display === "block") {
currentVContent.style.display = "none";
} else {
// Hide all other vcontents and display the current one
vcontents.forEach(content => {
if (content !== currentVContent) {
content.style.display = "none";
}
});
currentVContent.style.display = "block";
}
});
});
});
// component header
class Header extends HTMLElement
{
constructor()
{
super();
this.innerHTML = `