Gravatar for cbolduc@coveo.com

Question by Carl Bolduc, Apr 24, 2014 10:33 AM

How can I get the selected values of a facet when using the JavaScript Search Framework?

I need to know the currently selected values of my facets, I am using the JavaScript Search Framework. Is there a way to get those selected values?

1 Reply
Gravatar for apare@coveo.com

Answer by Alexandre Paré, Apr 24, 2014 10:36 AM

With the Coveo Jquery extension you can call any method of any component.

To get the selected values you have 2 options :

  • $('#MyFacet').coveo('getSelectedValues')
  • $('#MyFacet').coveo().getSelectedValues()

Here you have all the facet's methods.

Ask a question