const navbar = document.querySelector('#stikyNav'); //let top = navbar.offsetTop; function stickynavbar() { if (window.scrollY >= 200) { navbar.classList.add('sticky'); } else { navbar.classList.remove('sticky'); } } window.addEventListener('scroll', stickynavbar); document.addEventListener("DOMContentLoaded", () => { function counter(id, start, end, duration) { let obj = document.getElementById(id), current = start, range = end - start, increment = end > start ? 1 : -1, step = Math.abs(Math.floor(duration / range)), timer = setInterval(() => { current += increment; obj.textContent = current; if (current == end) { clearInterval(timer); } }, step); } counter("count3", 0, 216, 3000); counter("count4", 100, 38, 2500); counter("count5", 0, 35, 3000); counter("count6", 100, 8, 2500); counter("count7", 0, 10, 3000); }); $(document).ready(function(){ $('#clickTop').hide(); //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() > 300) { $('#clickTop').fadeIn(); } else { $('#clickTop').fadeOut(); } }); //Click event to scroll to top $('#clickTop').click(function(){ $('html, body').animate({scrollTop : 0},500); return false; }); }); function myFunction() { var dots = document.getElementById("dots"); var moreText = document.getElementById("more"); var btnText = document.getElementById("myBtn"); if (dots.style.display === "none") { dots.style.display = "inline"; btnText.innerHTML = "Read more"; moreText.style.display = "none"; } else { dots.style.display = "none"; btnText.innerHTML = "Read less"; moreText.style.display = "inline"; } } $('#owl-carousel').owlCarousel({ loop: true, margin: 30, dots: false, nav: false, items: 6, autoplay: true, }) $('#morethan').owlCarousel({ loop: true, margin: 30, dots: false, nav: false, items: 6, autoplay: true, responsive:{ 0:{ items:3, dots: true, }, 600:{ items:4 }, 1000:{ items:6 } } }) $('#owl-carousel_test').owlCarousel({ loop: true, margin: 30, dots: true, nav: false, items: 2, autoplay: true, responsive:{ 0:{ items:1, }, 600:{ items:2 }, 1000:{ items:2 } } }) $('#owl-carousel_built').owlCarousel({ loop: true, margin: 30, dots: false, nav: false, items: 1, // autoplay: true, })