{"id":1012,"date":"2025-03-24T14:28:16","date_gmt":"2025-03-24T14:28:16","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/remove-empty-fields-on-elementor-accordion\/"},"modified":"2025-04-03T15:24:37","modified_gmt":"2025-04-03T14:24:37","slug":"remove-empty-fields-on-elementor-accordion","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/code-snippets\/remove-empty-fields-on-elementor-accordion\/","title":{"rendered":"remove empty fields on Elementor accordion"},"content":{"rendered":"\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">(function($) {\n    $(window).on(&#039;elementor\/frontend\/init&#039;, function() {\n        if ($(&#039;.elementor-widget-n-accordion&#039;).length) {\n            return;\n        }\n        const accordionTitles = $(&#039;.e-n-accordion-item-title-text&#039;);\n        accordionTitles.each(function() {\n            if (!$(this).text().trim().length) {\n                $(this).parents(&#039;details&#039;).remove();\n            }\n        });\n    });\n})(jQuery);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,433],"class_list":["post-1012","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-code-snippets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/1012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=1012"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/1012\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=1012"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=1012"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=1012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}