> That technique only works when the tiddler is part of the permaview.
> That is, if I click on my sample tiddler, the images come up with the
> opaque background. But, if I make a permaview, and refresh the screen,
> then the sample tiddler displays correctly. The technique I mentioned
> previously, where the script is at the bottom of the tiddler, works
> whenever a tiddler is opened.
You're right. Instead of changing the PageTemplate, add this to the
bottom of the ViewTemplate:
<span macro='tiddler ViewTemplate##ssinit'></span><!--
!ssinit
<script>
var id='#'+story.findContainingTiddler(place).id;
jQuery(id).supersleight();
</script>
!end
-->
The first line gets the DOM element ID for the tiddler being rendered,
so that the enhanced supersleight PNG features are only applied to the
current tiddler element. (Note: 'place' is an 'environment variable'
defined by InlineJavascriptPlugin, and refers to the location where
the script's output, if any, will be 'wikified' and rendered. See
InlineJavascriptPluginInfo for details)
> But one more issue. Is there an id# or mechanism to avoid using
> 'body' ? Just the supersleight (ss) documentation recommends against
> using 'body'.
TW encloses the layout inside a DIV named #contentWrapper, which
includes everything defined by the PageTemplate HTML, but *not* the
'backstage' area, thus, you could write:
<script> jQuery('#contentWrapper').supersleight(); </script>
enjoy,
-e
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---