Skip to content

Instantly share code, notes, and snippets.

@beckettkev
Created December 17, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beckettkev/9f2c36e67145c7ccfa42 to your computer and use it in GitHub Desktop.
Save beckettkev/9f2c36e67145c7ccfa42 to your computer and use it in GitHub Desktop.
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