{"id":6005,"date":"2024-11-22T11:09:54","date_gmt":"2024-11-22T11:09:54","guid":{"rendered":"https:\/\/contentviewspro.com\/documentation\/?post_type=docs&#038;p=6005"},"modified":"2024-11-22T11:15:07","modified_gmt":"2024-11-22T11:15:07","password":"","slug":"live-filter-trigger-javascript-function-after-changing-filter","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/live-filter-trigger-javascript-function-after-changing-filter\/","title":{"rendered":"Live Filter &#8211; trigger custom Javascript action after selecting\/changing any filter"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Live Filter helps you to show frontend filters easily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To call a custom Javascript action\/function whenever selecting\/changing any filter, please use this Javascript code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$('body').on('pt-cv-pagination-finished', function() {\n    \/\/ add your JS code below\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(you can add this code to <span class=\"prokeys-snippet-text\">the <strong>Custom JS<\/strong> field in <a href=\"https:\/\/contentviewspro.com\/documentation\/wp-content\/uploads\/2018\/03\/Content-Views-_-Settings.png\">Content Views >> Settings<\/a> page<\/span>, or another place you know)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span class=\"prokeys-snippet-text\">Best regards,<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Live Filter helps you to show frontend filters easily. To call a custom Javascript action\/function whenever selecting\/changing any filter, please use this Javascript code: (you can add this code to the Custom JS field in Content Views >> Settings page, or another place you know) Best regards,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[46],"doc_tag":[],"class_list":["post-6005","docs","type-docs","status-publish","hentry","doc_category-live-filter"],"year_month":"2026-09","word_count":57,"total_views":"8","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"Live Filter (Frontend Search &amp; Filter)","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/live-filter\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/6005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=6005"}],"version-history":[{"count":5,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/6005\/revisions"}],"predecessor-version":[{"id":6012,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/6005\/revisions\/6012"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=6005"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=6005"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=6005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}