Forums › Forums › Search & Filter Pro › update filter element through javascript?
- This topic has 18 replies, 3 voices, and was last updated 7 years, 11 months ago by Anonymous.
-
Trevor(Private) November 29, 2016 at 2:51 pm #72828
You mean that it is not triggering the Auto Count refresh mechanism? This is because that jQuery val() method does not tell the browser that anything has changed and so the code listener that is used by the plugin thinks that nothing has changed. I asked Ross on a different project (of my own) if that could be done and I do not think we resolved it.
Anonymous(Private) November 30, 2016 at 9:05 pm #73386One more question,
If I set dropdown value from another filter element’s event,
url query string remains and result is different from what I expected.jQuery(‘.sf-field-taxonomy-taxonomy1 select’).on(‘change’,function(){
jQuery(‘.sf-field-taxonomy-taxonomy2 select’).val(”);
});url query strings after update
/search/?_sft_taxonomy1=xxx&_sfm_taxonomy2=yyy
_sfm_taxonomy2 should be removed.Anonymous(Private) December 1, 2016 at 9:59 am #73419At first, two filters selected so there are two query strings
/search/?_sft_taxonomy1=xxx&_sfm_taxonomy2=yyyI should be like this when change fitler1 and filter2 is reset.
/search/?_sft_taxonomy1=zzzBut filter2’s query remains
/search/?_sft_taxonomy1=zzz&_sfm_taxonomy2=yyy -
AuthorPosts