I am building a view that allows users to filter through posts on our site. When listing the potential categories users can filter by Toolset adds a hyphen to the beginning of each category title. I'm trying to remove those hyphens using JavaScript at the moment, and the JavaScript works but once a filter option is chosen the JavaScript no longer works.
Is there any documentation that you are following?
No
Is there a similar example that we can see?
No
I provided screenshots of where the hyphens exist on the view.
What is the link to your site?
Link to site: hidden link
Link to page on the site where the view exists: hidden link
And try to add the related JS hook and add your custom JS code within that hook. For example:
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.layout (object) The jQuery object for the View layout wrapper
*/
/// try to add your custom Javascript code here or use other hooks as required
});