Hi Arek
Sure you can access the slider plugin we use, and modify the values… Here is some sample code:
var slider_object = $('.searchandfilter .sf-field-post-meta-_price').find(".meta-slider")[0];
slider_object.noUiSlider.set(['22', null]); //if you want to update the min value
slider_object.noUiSlider.set([null, '100']); //if you want to update the max value
slider_object.noUiSlider.set(['123', '625']); //if you want to update both values
For each field in S&F, there is usually a parent li
, which will have a class attached specifically to target that field (and the slider).
For a post meta key of _price
, the class I used was .sf-field-post-meta-_price
– so take a look at the markup of hte search form for your field.
Then this should be fairly self explanatory –
var slider_object = $('.searchandfilter .sf-field-post-meta-_price').find(".meta-slider")[0];
The first line finds the meta slider itself and puts it into a variable.
The next lines simply set the values.
Hope that helps