Just figured out one way: use a ex:formatter. So your facet div looks
like this:
<div ex:role="facet" ex:expression=".status" ex:facetLabel="Status"
ex:formatter="statusFormatter"></div>

And you add a javascript function like this:

function statusFormatter(elmt) {
  var new_id = "exhibit-facet-value-"+elmt.title.split('
').join('');     // create an id based on the element's title, but
with spaces removed
  elmt.id = new_id;
}

Then css are go!

On Mar 17, 10:43 am, David Karger <[email protected]> wrote:
> I'm not immediately sure how to support such styling but maybe you can
> use or learn from the following example that uses images for facet 
> values:http://www.simile-widgets.org/exhibit/examples/shrooms/shrooms.html
>
> On 3/17/2010 10:37 AM, Matt Gilbert wrote:
>
> > is there a way to add classes to exhibit-facet-value divs based on the
> > particular value? So, for example, something now renders as:
> > <div class="exhibit-facet-value" title="Dead"> ... </div>
>
> > renders as
> > <div class="exhibit-facet-value exhibit-facet-value-dead"
> > title="Dead"> ... </div>
>
> > or
> > <div class="exhibit-facet-value exhibit-facet-value-1"
> > title="Dead"> ... </div>
>
> > with the number being always the same for that title? This would allow
> > for facet values to be color-coded, etc.

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to