As a web developer, you may have come across a scenario where you want to determine whether an element is visible within the viewport of a web page. This is useful for triggering certain events or actions when an element comes into view, such as lazy loading images or animating elements as they enter the […]
$('.mobile-menu>li.menu-item-has-children').click(function() { if ($(this).find("ul").css("display") == "block") { $(this).find("ul").css({ "display": "none" }); } else { $(this).find("ul").css({ "display": "block" }); } })
$('a[data-bs-toggle="pill"]').on("shown.bs.tab", function (e) { $(".slider-name").slick("setPosition"); });
$(window).scroll(function () { var scroll = $(window).scrollTop(); if (scroll >= 200) { $(".not-scrolled").css("display", "none"); $(".scrolled").css("display", "flex"); } else { $(".scrolled").css("display", "none"); $(".not-scrolled").css("display", "flex"); } });