{"id":3344,"date":"2025-06-06T12:01:03","date_gmt":"2025-06-06T12:01:03","guid":{"rendered":"https:\/\/www.njfuture.org\/?page_id=3344"},"modified":"2025-12-30T13:23:26","modified_gmt":"2025-12-30T13:23:26","slug":"global-search","status":"publish","type":"page","link":"https:\/\/www.njfuture.org\/global-search\/","title":{"rendered":"Global Search"},"content":{"rendered":"\n<div class=\" bg-[#E2E6EC]\">\n  <div class=\"container py-10\">\n    <h2 class=\"font-gotham text-center uppercase font-medium text-5xl text-[#004970]\">What can we help you find?<\/h2>\n    <div class=\"h-1 bg-white w-full my-10\"><\/div>\n\n    <form id=\"ajax-search-form\" method=\"POST\" action=\"\"\n      class=\"relative w-full [@media(min-width:400px)]:w-2\/3 mx-auto bg-white rounded-lg\">\n      <input name=\"s\" id=\"search-input\"\n        class=\"text-xl rounded-lg w-full pr-20 py-4 placeholder:text-[#495D6E] px-9 bg-white\" type=\"text\"\n        placeholder=\"Search by keyword\" value=\"\">\n      <button type=\"submit\"\n        class=\"absolute top-1\/2 -translate-y-1\/2 right-9 bg-transparent border-0 p-0 cursor-pointer\">\n        <img decoding=\"async\" class=\"h-[50%]\" src=\"https:\/\/www.njfuture.org\/wp-content\/themes\/new-jersey-production\/assets\/images\/icons\/search-2.svg\" alt=\"Search\">\n      <\/button>\n    <\/form>\n\n    <div id=\"search-keywords\" class=\"hidden\">\n\n      <div class=\"w-2\/3 flex justify-between items-center mx-auto mt-6 \">\n        <div id=\"keywords-container\" class=\"flex flex-wrap gap-2\">\n        <\/div>\n\n        <button id=\"clear-search\" class=\"text-[#495D6E] font-bold text-lg cursor-pointer hover:text-[#374151]\">\n          Clear Search\n        <\/button>\n\n      <\/div>\n    <\/div>\n\n  <\/div>\n\n  <div id=\"search-results\" class=\"py-6 bg-[#F1F4F8]\">\n    <div class=\"container\">\n      <div id=\"results-count\" class=\"text-[#404041] mb-4 hidden\">\n        Found <span id=\"count-number-text\">0<\/span> results\n      <\/div>\n      <div id=\"results-container\" class=\"space-y-1\"><\/div>\n      <div id=\"loading-indicator\" class=\"text-center py-4 hidden\">\n        <div class=\"inline-block animate-spin rounded-full h-8 w-8 border-4 border-[#004970] border-t-transparent\">\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\n  (function ($) {\n    const $form = $('#ajax-search-form');\n    const $input = $('#search-input');\n    const $resultsContainer = $('#results-container');\n    const $resultsCount = $('#results-count');\n    const $countNumber = $('#count-number');\n    const $loadingIndicator = $('#loading-indicator');\n\n    $form.on('submit', function (e) {\n      e.preventDefault();\n      performSearch();\n    });\n\n    \/\/ Add clear search functionality\n    $('#clear-search').on('click', function () {\n      $input.val('');\n      $resultsContainer.empty();\n      $resultsCount.addClass('hidden');\n      $('#search-keywords').addClass('hidden');\n    });\n\n    function displayKeywords(searchQuery) {\n      const keywords = searchQuery.split(' ').filter(keyword => keyword.length > 0);\n      const $keywordsContainer = $('#keywords-container');\n      $keywordsContainer.empty();\n\n      keywords.forEach(keyword => {\n        const $keyword = $('<div>', {\n          class: 'bg-[#F1F4F8] text-[#004970] pl-5 pr-3 py-4 gap-1 rounded flex items-center',\n          html: `\n                    <span>${keyword}<\/span>\n                    <button class=\"ml-2 cursor-pointer\" data-keyword=\"${keyword}\">\n                      <img decoding=\"async\" class=\"w-6 h-6\" src=\"https:\/\/www.njfuture.org\/wp-content\/themes\/new-jersey-production\/assets\/images\/icons\/close-btn-gray.svg\" alt=\"Close\">\n                    <\/button>\n                `\n        });\n\n        $keywordsContainer.append($keyword);\n      });\n\n      \/\/ Update the count badge\n      $('#count-number').text(keywords.length);\n\n      \/\/ Add click handlers for removing individual keywords\n      $keywordsContainer.on('click', 'button', function () {\n        const keywordToRemove = $(this).data('keyword');\n        const newSearchQuery = keywords.filter(k => k !== keywordToRemove).join(' ');\n        $input.val(newSearchQuery);\n        if (newSearchQuery.trim()) {\n          performSearch();\n        } else {\n          $('#clear-search').trigger('click');\n        }\n      });\n    }\n\n    function performSearch() {\n      const searchQuery = $input.val().trim();\n\n      if (searchQuery.length < 1) {\n        $resultsContainer.empty();\n        $resultsCount.addClass('hidden');\n        $('#search-keywords').addClass('hidden');\n        return;\n      }\n\n      \/\/ Show keywords\n      $('#search-keywords').removeClass('hidden');\n      displayKeywords(searchQuery);\n\n      $loadingIndicator.removeClass('hidden');\n      $resultsContainer.empty();\n      $resultsCount.addClass('hidden');\n\n      $.ajax({\n        url: 'https:\/\/www.njfuture.org\/wp-admin\/admin-ajax.php',\n        type: 'GET',\n        data: {\n          action: 'ajax_search',\n          s: searchQuery\n        },\n        success: function (response) {\n          if (response.success) {\n            $resultsCount.removeClass('hidden');\n            $('#count-number-text').text(response.results.length);\n\n            if (response.results.length) {\n              const results = response.results.map(function (result) {\n                return $('<a>', {\n                  class: 'py-6 block border-b border-[#9AB1BE]',\n                  href: result.download_file ? result.download_file : result.url,\n                  target: result.download_file ? '_blank' : '_self'\n                }).append(\n                  $('<h2>', {\n                    class: 'text-xl font-bold mb-4 text-[#004970] hover:text-[#003557]',\n                    text: result.title\n                  })\n                ).append(\n                  $('<span>', {\n                    class: 'rounded-lg bg-[#498949] py-2 px-3 text-white w-fit uppercase mb-2',\n                    text: result.type\n                  })\n                );\n              });\n              $resultsContainer.append(results);\n            } else {\n              $resultsContainer.html(\n                $('<div>', {\n                  class: 'text-center text-[#495D6E] py-8',\n                  text: 'No results found for your search.'\n                })\n              );\n            }\n          }\n        },\n        error: function () {\n          $resultsContainer.html(\n            $('<div>', {\n              class: 'text-center text-red-600 py-8',\n              text: 'An error occurred while searching. Please try again.'\n            })\n          );\n        },\n        complete: function () {\n          $loadingIndicator.addClass('hidden');\n        }\n      });\n    }\n  })(jQuery);\n<\/script>\n\n<div class=\"py-20\">\n  <div class=\"container\">\n    <h2 class=\"font-gotham font-medium text-4xl text-brand-jersey-blue\">Explore<\/h2>\n\n    <div class=\"grid grid-cols-2 lg:grid-cols-3 gap-6 mt-10\">\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/about\/mission-vision-principles\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/ed560ff568ce0fda784c7d3418c2fc40c0ccb343.jpg\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">About Us<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/our-work\/how-we-do-our-work\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/45ded7056ec1bf94d069d199cd942543c04766eb-scaled.jpg\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Our Work<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/collaboratives\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/6d3f3ad81f4b958731705e4fa9ffcd2c8665dd04.png\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Collaboratives<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/impact\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/b64d4bff56fccf83416eeadc549bbb3cd1afb099.jpg\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Impact<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/news\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/740b0cac13d7efa250b0fab63f7cf283e6637466-scaled.png\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">News<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/resources\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/e2ea84b0ec3c73b4f92a73560a78e44089920fa9-scaled.png\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Resources<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/events\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/ed02546455677e0d586b3b55f087794679ef07eb-scaled.jpg\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Events<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"#\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/8ddff86785019171285cd34bc624ba2d3ae89723-scaled.jpg\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Get Involved<\/span>\n      <\/a>\n            <a class=\"w-full block border-b border-brand-light-steel-blue\" href=\"\/smart-growth-101\/\">\n        <div class=\"aspect-video relative flex \">\n          <img decoding=\"async\" class=\"w-full h-full object-cover\" src=\"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/06\/ee91d342750270bfee79522e69198bb86ed6d1a2.png\"\n            alt=\"\">\n                  <\/div>\n        <span class=\"text-brand-black text-2xl capitalize block mb-6 mt-4\">Smart Growth 101<\/span>\n      <\/a>\n          <\/div>\n\n    <div class=\"flex justify-center mt-12\">\n      <a class=\"rounded-full bg-brand-gold w-10 aspect-square flex items-center justify-center\"\n        href=\"https:\/\/www.njfuture.org\">\n        <img decoding=\"async\" class=\"aspect-video object-cover w-7\" src=\"https:\/\/www.njfuture.org\/wp-content\/themes\/new-jersey-production\/assets\/images\/icons\/Close.svg\" alt=\"\">\n      <\/a>\n    <\/div>\n  <\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-3344","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Global Search - New Jersey Future<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.njfuture.org\/global-search\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Global Search - New Jersey Future\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.njfuture.org\/global-search\/\" \/>\n<meta property=\"og:site_name\" content=\"New Jersey Future\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/NewJerseyFuture\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-30T13:23:26+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@NewJerseyFuture\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/global-search\\\/\",\"url\":\"https:\\\/\\\/www.njfuture.org\\\/global-search\\\/\",\"name\":\"Global Search - New Jersey Future\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#website\"},\"datePublished\":\"2025-06-06T12:01:03+00:00\",\"dateModified\":\"2025-12-30T13:23:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/global-search\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.njfuture.org\\\/global-search\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/global-search\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.njfuture.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Global Search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#website\",\"url\":\"https:\\\/\\\/www.njfuture.org\\\/\",\"name\":\"New Jersey Future\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.njfuture.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#organization\",\"name\":\"New Jersey Future\",\"url\":\"https:\\\/\\\/www.njfuture.org\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.njfuture.org\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/NJF-Footer-Logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.njfuture.org\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/NJF-Footer-Logo.svg\",\"width\":354,\"height\":285,\"caption\":\"New Jersey Future\"},\"image\":{\"@id\":\"https:\\\/\\\/www.njfuture.org\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/NewJerseyFuture\\\/\",\"https:\\\/\\\/x.com\\\/NewJerseyFuture\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Global Search - New Jersey Future","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.njfuture.org\/global-search\/","og_locale":"en_US","og_type":"article","og_title":"Global Search - New Jersey Future","og_url":"https:\/\/www.njfuture.org\/global-search\/","og_site_name":"New Jersey Future","article_publisher":"https:\/\/www.facebook.com\/NewJerseyFuture\/","article_modified_time":"2025-12-30T13:23:26+00:00","twitter_card":"summary_large_image","twitter_site":"@NewJerseyFuture","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.njfuture.org\/global-search\/","url":"https:\/\/www.njfuture.org\/global-search\/","name":"Global Search - New Jersey Future","isPartOf":{"@id":"https:\/\/www.njfuture.org\/#website"},"datePublished":"2025-06-06T12:01:03+00:00","dateModified":"2025-12-30T13:23:26+00:00","breadcrumb":{"@id":"https:\/\/www.njfuture.org\/global-search\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.njfuture.org\/global-search\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.njfuture.org\/global-search\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.njfuture.org\/"},{"@type":"ListItem","position":2,"name":"Global Search"}]},{"@type":"WebSite","@id":"https:\/\/www.njfuture.org\/#website","url":"https:\/\/www.njfuture.org\/","name":"New Jersey Future","description":"","publisher":{"@id":"https:\/\/www.njfuture.org\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.njfuture.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.njfuture.org\/#organization","name":"New Jersey Future","url":"https:\/\/www.njfuture.org\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.njfuture.org\/#\/schema\/logo\/image\/","url":"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/12\/NJF-Footer-Logo.svg","contentUrl":"https:\/\/www.njfuture.org\/wp-content\/uploads\/2025\/12\/NJF-Footer-Logo.svg","width":354,"height":285,"caption":"New Jersey Future"},"image":{"@id":"https:\/\/www.njfuture.org\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/NewJerseyFuture\/","https:\/\/x.com\/NewJerseyFuture"]}]}},"_links":{"self":[{"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/pages\/3344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/comments?post=3344"}],"version-history":[{"count":8,"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/pages\/3344\/revisions"}],"predecessor-version":[{"id":15198,"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/pages\/3344\/revisions\/15198"}],"wp:attachment":[{"href":"https:\/\/www.njfuture.org\/wp-json\/wp\/v2\/media?parent=3344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}