I've run across two situations so far...

1) In the Thumbnail View, I would like to use Lightbox.  For that, I 
would need to add a particular class to each image anchor that is 
specific to lightbox functionality.


2) I'd like to have classes specific to my facet selections.  Maybe for 
one of the facet selections, the background color of the images would 
change, or the font in a tabular view would change.  Just another cue to 
help users filter through the results.


Adding a specific css class is just one reason I would like to run a 
function against all items (or selected items) in the database after 
each filter/facet is applied.  I just sent a post to the list with 
specific questions.  I could then add/change HTML content (text, links, 
images, etc...)  to various parts of the page based on user selections.  
I guess that's the larger question I'm after.


- John

**************************************************
John Callahan
Geospatial Application Developer
Delaware Geological Survey, University of Delaware
227 Academy St, Newark DE 19716-7501
Tel: (302) 831-3584  
Email: [email protected]
http://www.dgs.udel.edu
**************************************************




David Huynh wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to