Webinars

`; paginationHTML += `
` paginationContainer.innerHTML = paginationHTML; const paginationLinks = document.querySelectorAll('.pagination-link'); paginationLinks.forEach(function (link) { link.addEventListener('click', function (event) { event.preventDefault(); const pageNumber = parseInt(this.getAttribute('data-page')); currentPage = pageNumber showPage(pageNumber); }); }); document.getElementById('video-prev').addEventListener('click', function (event) { if (currentPage > 1) { currentPage -= 1 showPage(currentPage) } }) document.getElementById('video-next').addEventListener('click', function (event) { if (currentPage < totalPages) { currentPage += 1 showPage(currentPage) } }) } function performSearch(searchText, activePage) { const filteredContainers = Array.from(containers).filter(function (container) { const containerId = container.id.toLowerCase(); return containerId.includes(searchText); }); filteredContainers.forEach(function (container, index) { if (index >= 0 && index < 8) { container.style.display = 'block'; } else { container.style.display = 'none'; } }); const totalFilteredItems = filteredContainers.length; currentPage = 1 updatePagination(totalFilteredItems, activePage); } document.getElementById('search-bar').addEventListener('input', function () { const searchText = this.value.trim().toLowerCase(); if (searchText !== '') { performSearch(searchText, 1); } else { showPage(1); updatePagination(containers.length, 1); } }); showPage(1); updatePagination(containers.length, 1); });

Sign up for Vtiger today

Cancel anytime. No Credit card required.