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"); } });
<?php if (!defined(ABSPATH)) { $pagePath = explode('/wp-content/', dirname(__FILE__)); include_once(str_replace('wp-content/', '', $pagePath[0] . '/wp-load.php')); } $wordpress_upload_dir = wp_upload_dir(); // $wordpress_upload_dir['path'] is the full server path to wp-content/uploads/2017/05, for multisite works good as well // $wordpress_upload_dir['url'] the absolute URL to the same folder, actually we do not need it, just to show the link to file $i […]
By default WordPress allows you to categorize your content. This functionality is extremely powerful and allows you to have full control of your content. Using this recipe will allow you to find all posts (custom or pages) that are in the same category. This will allow you to build recommended reading sections, customize your archive […]