Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
var refiner = $getClientControl(document.getElementById($('div[refinername="' + refinerName + '"]').attr('id')));
/*
Where "refinerName" is the refiner - you now have the SP Refiner control from which you can invoke any refiner methods
Apply a refinement
refiner.addRefinementFilter(refinerName,'\"Refinement Value\"');
Apply a refinement with Or
refiner.addRefinementFiltersJSONWithOr('{\u0022' + refinerName + '\u0022:Refinement Value}');
Remove an active refinement on a refiner
refiner.updateRefinersJSON('{\u0022' + refinerName + '\u0022:null}');
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment