|
|
Remove dash from subcategories in legacy View filter dropdown
Started by: sarahP
in: Toolset Professional Support
Quick solution available
Problem:
How to remove the spaces and dashes 0 in the dropdown filter?
Solution:
Add the JS code below:
jQuery( document ).ready(function() {
jQuery('select[name="wpv-authors"] option').each(function () {
var theText = jQuery(this).text();
theText = theText.replace(' -','');
jQuery(this).text(theText)
});
});
jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
jQuery('select[name="wpv-authors"] option').each(function () {
var theText = jQuery(this).text();
theText = theText.replace(' -','');
jQuery(this).text(theText)
});
});
Relevant Documentation:
https://toolset.com/course-lesson/adding-custom-javascript-to-views-templates-and-archives/
|
|
2 |
5 |
3 years, 1 month ago
sarahP
|