Hi Mario, I like the team work TW. I missed that somehow.
I notice that you've added .find to the .css. Reading FNDs excellent Jquery TW [1] shows ‘.find’ gets the descendants of each element in the current set of matched elements - a new one one me. I've struggled with turning it into a plugin. I still can't get my head round plugins. I tried adding the if clause to the code which generates the references popup, but it added the color only when clicked. I was going to keep it as a tiddler and then include that tiddler into ViewTemplate, but I can see that is not the best way. In the future I am going to experiment with making making references invisible if they are not present, and mouseover lists. I'll keep the group posted. I think that TW does references - more commonly known as backlinks I recently learned - really well. Media wiki and wikispaces send you to another page: so clunky thanks for your help Best Wishes Alex [1] http://fnd.lewcid.org/tmp/jQueryAPI.html#find On 27 May 2010 14:33, PMario <[email protected]> wrote: > Hi > Made some tests. > Would be cool if it is a small plugin > > [1] > http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#ReferencesNewColor%20ReferencesNewColor_ref > > I found, that (this) points to Window.something > and jQuery('.command_references') finds every button on the page so > changed it to jQuery('#tiddler'+ because every tiddler has an ID. > > <script> > if (store.getReferringTiddlers(tiddler.title)) { > > > jQuery('#tiddler'+tiddler.title).find('.command_references').css("color","red"); > } > </script> > > Needs more testing. > Would be cool, if you post your result at the TeamWork TW[1], or a > link to your finished plugin, if there will be one :) > > have fun! > Mario > > On May 27, 10:06 am, Alex Hough <[email protected]> wrote: > > This script is an attempt to color ‘references’ in the toolbar red if > > the tiddler has references. > > It doesn't work. > > > > <script> > > var title = store.getTiddler(this); > > var references = store.getReferringTiddlers(title); > > if (references.length > 0) { > > jQuery('.command_references').css("color","red"); > > } > > </script> > > > > Any hints and tips? > > > > thanks in advance > > > > Alex > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tiddlywiki%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tiddlywiki?hl=en. > > -- http://www.multiurl.com/g/64 -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" 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/tiddlywiki?hl=en.

