<script>
document.addEventListener("DOMContentLoaded", function () {

    const tabs = document.querySelectorAll(".wpb-resource-tabs .g-filters-item");
    const items = document.querySelectorAll(".w-grid-item");

    tabs.forEach(tab => {

        tab.addEventListener("click", function (e) {
            e.preventDefault();

            let filter = this.getAttribute("data-filter");

            items.forEach(item => {

                if (filter === "*") {
                    item.style.display = "";
                } else {
                    let matchClass = "resource_category-" + filter;
                    item.style.display = item.classList.contains(matchClass)
                        ? ""
                        : "none";
                }

            });

            // ACTIVE CLASS
            tabs.forEach(t => t.classList.remove("active"));
            this.classList.add("active");

            // CLEAN URL (NO DOTS)
            if (filter === "*") {
                history.pushState(null, "", "/free-resources/");
            } else {
                history.pushState(null, "", "/free-resources/" + filter);
            }

        });

    });

});
</script>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://itsme.biz/wp-sitemap.xsl" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://itsme.biz/resource_category/portfolio101/</loc></url><url><loc>https://itsme.biz/resource_category/howto/</loc></url><url><loc>https://itsme.biz/resource_category/illustrate-tips/</loc></url></urlset>
