Title: add &amp; remove class wpc-opened
Last modified: March 8, 2023

---

# add & remove class wpc-opened

 *  [hi4web](https://wordpress.org/support/users/hi4web/)
 * (@hi4web)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/add-remove-class-wpc-opened/)
 * Hello
 * Kindly note that I customized the filter everything plugin to the following
   [https://allbrandsfactoryoutlet.com/new/product-category/2-women/](https://allbrandsfactoryoutlet.com/new/product-category/2-women/)
   but I have problem when I click to the filter button the content section opened
   but it’s not close when I click outside the box so I added the following code
   to fix this issue
 *     ```wp-block-code
       <script>
       	jQuery(document).on('click', 'body', function(e) {
           if (!$(e.target).is('.wpc-filter-title button'))
             $('.wpc-filters-section').removeClass('wpc-opened')
       		.addClass('wpc-closed');
         });
       </script>
       ```
   
 *  it’s working fine but it’s not covered all the button it’s working when you 
   click up of the arrow could you please help me to fix it ?
 * Best regards
   Rawaf

The topic ‘add & remove class wpc-opened’ is closed to new replies.

 * ![](https://ps.w.org/filter-everything/assets/icon-256x256.png?rev=3487105)
 * [Filter Everything — WordPress & WooCommerce Filters](https://wordpress.org/plugins/filter-everything/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/filter-everything/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/filter-everything/)
 * [Active Topics](https://wordpress.org/support/plugin/filter-everything/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/filter-everything/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/filter-everything/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [plugin](https://wordpress.org/support/topic-tag/plugin/)

 * 0 replies
 * 1 participant
 * Last reply from: [hi4web](https://wordpress.org/support/users/hi4web/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/add-remove-class-wpc-opened/)
 * Status: not a support question