File: /var/www/html/lab-portal/assets/custom.js.download
//homepage banner slider initialize
jQuery(document).ready(function($) {
$('#homeLeftSlide').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
});
$('#testimonialsHome').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
dots: true,
autoplaySpeed: 2000,
});
$('form.wpcf7-form').on('submit', function() {
// Delay the reset to ensure form data is processed
setTimeout(function() {
$('form.wpcf7-form')[0].reset(); // Reset the form fields
}, 1000); // Adjust the delay time if needed
});
});
//to run menu opacity
// document.addEventListener('DOMContentLoaded', function () {
// const dropdowns = document.querySelectorAll('.nav-item.dropdown');
// const contentSections = document.querySelectorAll('section');
// let currentDropdown = null;
// dropdowns.forEach(dropdown => {
// dropdown.addEventListener('show.bs.dropdown', function () {
// currentDropdown = dropdown;
// contentSections.forEach(section => section.classList.add('dull'));
// });
// dropdown.addEventListener('hide.bs.dropdown', function () {
// if (currentDropdown === dropdown) {
// currentDropdown = null;
// contentSections.forEach(section => section.classList.remove('dull'));
// }
// });
// });
// // Close dropdown and remove dull class on click outside
// document.addEventListener('click', function (event) {
// if (!event.target.closest('.dropdown')) {
// currentDropdown = null;
// contentSections.forEach(section => section.classList.remove('dull'));
// }
// });
// });