thanks again David -- with this view into a working example, i see that I was using api 2.0, while you have 2.2.
Using 2.2 now, I am able to do this - and tooltips on facets work for me too! thank you, -k On Jun 9, 6:20 pm, David Huynh <[email protected]> wrote: > Please see this working example > > http://people.csail.mit.edu/dfhuynh/misc/facet-tooltips/facet-tooltip... > > Hover over the choices in the "author" facet to see custom tooltips. > > David > > kumarachi wrote: > > Hi Daivd, yes - in both cases, the function is not registering - > > nothing happens... > > > thanks. > > > On May 29, 4:59 am, David Huynh <[email protected]> wrote: > > >> Have you tried > >> ex:formatter="titleFormatter" > >> rather than > >> ex:formatter="titleFormatter(this);" > > >> David > > >> kumarachi wrote: > > >>> Hi David, thanks for the suggestion. In my case, somehow, the > >>> function is not being called at all, as if ex:formatter is not being > >>> recognized... > > >>> i just put an alert in the function and nothing happens...any > >>> thoughts? > > >>> <script> > >>> function titleFormatter(elmt) { > >>> alert('hey'); > >>> } > >>> </script> > > >>> <div ex:role="facet" ex:expression=".label" ex:showMissing="False" > >>> style="width:160px;" ex:formatter="titleFormatter(this);"></div> > > >>> On May 27, 7:12 pm, David Huynh <[email protected]> wrote: > > >>>> kumarachi wrote: > > >>>>> Hi, > > >>>>> Is there any way to display a tooltip on hover on an item in a facet? > > >>>>> I have long names and Acronyms...i want to display the acronyms in the > >>>>> Facet, but show the long name on hover. > > >>>>> is this possible? > > >>>>> I am guessing it is possible, using something like ex:tooltip, but > >>>>> with api-2.0, this directive is not being recognized. > > >>>>> I have tried also just adding 'title', which works, but I am not sure > >>>>> how to reference the long-name, from my data. > > >>>>> <td><div ex:role="facet" ex:expression=".acronym" ex:facetLabel="Name" > >>>>> ex:showMissing="False" style="width:160px;" title=.long-name></div></ > >>>>> td> > > >>>> Kumarachi, > > >>>> The facet doesn't support ex:tooltip, but that's a good idea. > > >>>> Right now, you could use the "formatter" attribute to do what you want > > >>>> <div ex:role="facet" ... ex:formatter="titleFormatter"></div> > > >>>> <script> > >>>> function titleFormatter(elmt) { > >>>> var label = > >>>> $(elmt).find('.exhibit-facet-value-link')[0].firstChild.nodeValue; > >>>> var longName = window.database.getObject(label, "long-name"); > >>>> elmt.title = longName; > >>>> } > >>>> </script> > > >>>> Let me know if that works. > > >>>> 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 -~----------~----~----~----~------~----~------~--~---
