First, let me explain best practices for using jQuery inside a View or Content Template's JS panel. Always wrap your jQuery code in a document ready handler, and always use "jQuery" instead of "$" unless you know what you're doing. Example:
jQuery(document).ready(function(){
// add your code here using "jQuery" instead of "$"
});
The Slider component is part of jQuery UI:
hidden link
If you have not included the required files for the jQuery UI library, you need to do so. They will not be loaded by default.
Next take a look at this comment:
https://toolset.com/forums/topic/parametric-search-numeric-slider-for-price-range/#post-105656
You need to create an element in your filter controls that will be used as a placeholder for the slider. jQuery will do the magic inside this element:
<div id="price-slider"></div>
Then modify this code to target your text search input fields correctly (I believe you mentioned that you had already done this):
jQuery(document).ready(function(){
jQuery("#price-slider").slider({
range: true,
min: 0,
max: 1000000,
step: 10000,
values: [0, 1000000],
slide: function(event, ui) {
jQuery('#wpv_control_textfield_min-price').val(formatNumber(ui.values[0]));
jQuery('#wpv_control_textfield_max-price').val(formatNumber(ui.values[1]));
}});
jQuery('#wpv_control_textfield_min-price, #wpv_control_textfield_max-price').change(function() {
jQuery('#price-slider').slider('values', [parseInt($('#wpv_control_textfield_min-price').val()), parseInt($('#wpv_control_textfield_max-price').val())]);
});
});
didn't do nothing
Is that because there are errors, or because your code isn't executing, or because of bugs in your code? Check the browser console for errors. If there are errors, debug them. If there are no errors, and it seems like nothing is happening, it's probably because your filter selectors are wrong, or your code isn't executing for another reason. Add debuggers or console log statements to pinpoint the problem. Let me know where you get stuck.