{"id":1022,"date":"2022-05-20T16:07:41","date_gmt":"2022-05-20T16:07:41","guid":{"rendered":"https:\/\/forcys1.wpengine.com\/the-watch\/"},"modified":"2025-12-10T14:30:38","modified_gmt":"2025-12-10T14:30:38","slug":"the-watch","status":"publish","type":"page","link":"https:\/\/www.forcys.com\/us\/the-watch\/","title":{"rendered":"The Watch"},"content":{"rendered":"\n<section class=\"py-12 md:py-20.75 \"  id=\"block_a6f4117e6dfd4ea78f856e7b3c625e86\">\n    <div class=\"holder\">\n        <div class=\"flex max-md:flex-col flex-wrap gap-10 md:items-center md:justify-between\">\n                            <div class=\"slide-up\" data-scroll=\"\">\n                    <h2 class=\"text-blue text-40 md:text-5xl font-SatoshiBold font-bold leading-[1.2]\">The Watch<\/h2>\n                <\/div>\n            \n            <div class=\"flex items-center gap-2 md:gap-4 max-md:w-full\">\n                                    <div class=\"max-md:flex-1 md:w-83 h-10 md:h-11 slide-up [animation-delay:0.4s]! selectContainer\" data-scroll=\"\">\n                        <select class=\"selectFilter w-full\" name=\"news-category\" id=\"news-category\">\n                            <option value=\"\">all<\/option>\n                                                            <option value=\"blogs\">Blogs<\/option>\n                                                            <option value=\"case-studies\">Case Studies<\/option>\n                                                            <option value=\"press\">Press<\/option>\n                                                            <option value=\"thought-leadership\">Thought Leadership<\/option>\n                                                            <option value=\"white-papers\">White Papers<\/option>\n                                                    <\/select>\n                    <\/div>\n                \n                <div class=\"md:w-46 w-28 h-10 md:h-11 slide-up\" data-scroll=\"\">\n                    <div class=\"relative md:w-46 w-28 h-10 md:h-11 flex items-center watchEvent\">\n                        <input class=\"absolute w-full h-full opacity-0 left-0 top-0\" type=\"checkbox\" name=\"events\" id=\"events\">\n                        <label class=\"rounded-35 border border-blue px-3 md:px-4 py-3 md:py-3.5 leading-none h-full w-full text-sm font-SatoshiBold font-bold tracking-16 uppercase relative after:absolute after:w-3.5 after:h-3.5 after:border-2 after:md:border-[3px] after:border-blue after:top-1\/2 after:-translate-y-1\/2 after:right-4 after:rounded-full cursor-pointer select-none\" for=\"events\">events<\/label>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div class=\"border-t border-blue\/10 pt-8 md:pt-10 md:mt-11.5 mt-8\">\n        <div class=\"holder\">\n            <div id=\"news-items\" class=\"newsItems grid gap-5\"><\/div>\n\n            <!-- Loading Spinner -->\n            <div id=\"loading-spinner\" class=\"mt-6 md:mt-16\" style=\"display: none;\">\n                <div class=\"ajax-loader\"><\/div>\n            <\/div>\n\n            <div class=\"text-center mt-8 md:mt-20\">\n                <button class=\"btn btn-dark cursor-pointer\" id=\"load-more\"><span>Load more<\/span><\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n\n    <script>\n        jQuery(document).ready(function($) {\n            let ajaxUrl = 'https:\/\/www.forcys.com\/us\/wp-json\/custom\/v1\/news-grids';\n            let currentPage = 1;\n            let isLoading = false;\n            let currentCategory = '';\n            let loadedPostsCount = 0;\n\n            function fetchNewsPost(loadMore = false) {\n                if (isLoading) return;\n\n                let postsPerPage = $(window).width() >= 1024 ? 13 : 8;\n\n                if (!loadMore) {\n                    currentPage = 1;\n                    loadedPostsCount = 0;\n                }\n\n                isLoading = true;\n                $('#load-more').hide();\n                $('#loading-spinner').show();\n\n                \/\/ currentCategory = $('#news-category').val();\n                \/\/ Determine which filter to apply\n                if ($('#events').is(':checked')) {\n                    currentCategory = 'events';\n                } else {\n                    currentCategory = $('#news-category').val(); \/\/ normal categories\n                }\n\n\n                $.ajax({\n                    url: ajaxUrl,\n                    method: 'GET',\n                    data: {\n                        page: currentPage,\n                        category: currentCategory,\n                        posts_per_page: postsPerPage\n                    },\n                    success: function(response) {\n                        if (!loadMore) {\n                            $('#news-items').empty();\n                        }\n\n                        $('#news-items').append(response.html);\n                        loadedPostsCount += response.count;\n\n                        if (loadedPostsCount < response.total_posts) {\n                            $('#load-more').show();\n                        } else {\n                            $('#load-more').hide();\n                        }\n\n\n                        initInViewAnimation();\n                    },\n                    complete: function() {\n                        isLoading = false;\n                        $('#loading-spinner').hide();\n                    }\n                });\n            }\n\n\n            \/\/ Normal category select\n            $('#news-category').on('change', function() {\n                $('#events').prop('checked', false); \/\/ uncheck events filter\n                fetchNewsPost(false);\n            });\n\n            \/\/ Events checkbox filter\n            $('#events').on('change', function() {\n                \/\/ When events is checked, clear normal category dropdown\n                if ($(this).is(':checked')) {\n                    $('#news-category').val('');\n                }\n                fetchNewsPost(false);\n            });\n\n\n            \/\/ Load More Button\n            $('#load-more').on('click', function(e) {\n                e.preventDefault();\n                currentPage++;\n                fetchNewsPost(true);\n            });\n\n            \/\/ === Slide-up animation on viewport ===\n            function initInViewAnimation() {\n                const slideUps = document.querySelectorAll('.slide-up');\n                const observer = new IntersectionObserver(\n                    entries => {\n                        entries.forEach(entry => {\n                            if (entry.isIntersecting) {\n                                entry.target.classList.add('in-view');\n                                observer.unobserve(entry.target); \/\/ only trigger once\n                            }\n                        });\n                    }, {\n                        threshold: 0.2\n                    } \/\/ trigger when 20% visible\n                );\n\n                slideUps.forEach(el => observer.observe(el));\n            }\n\n            \/\/ Initial Load\n            fetchNewsPost(false);\n            initInViewAnimation();\n        });\n    <\/script>\n<\/section>\n<!-- ============= End of \/.newsPromo--block =============== -->","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":85,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1022","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/pages\/1022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/comments?post=1022"}],"version-history":[{"count":0,"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/pages\/1022\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.forcys.com\/us\/wp-json\/wp\/v2\/media?parent=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}