John Callahan wrote:
> I'd like to add a class to each item in my Exhibit data stream. Using
> jQuery seems to be the easiest way. For example, to add a class called
> "red" to all a tags, I should be able to do something like:
>
> $("a").addClass("red"); ...or, specifically...
> $("div.exhibit-collectionView-body a").addClass("red");
>
> However, where do I put this? Is there a javascript function that gets
> called once the data is loaded and the default collection is set? Can I
> define my own javascript callback function?
>
>
> A further detail would be to perform this call after a facet/filter is
> selected. For example, if I had a facet category called "fruit", then
> whenever you selected "banana", I could assign the class "yellow" to all
> items, or if they selected "blueberry", I could assign the "blue" class
> to all items (well, filtered items would probably be better.) Is
> there a javascript callback function after facet/filter selection?
>
>
> I saw in a previous post by David H about adding a listener to the
> collection. I wasn't sure where to define the listener or how to make
> that work. Seems like that could be an avenue worth exploring. Thanks
> for your help.
>
John,
Just curious but why do you want to add a css class? Couldn't you just
specify more css rules on the existing classes?
David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---