I don't know if it is of any help but I did something like this not to long 
ago using an inline script and a little CSS:
(Which is particularly handy since this method allows me to hide/show 
blocks of images along with text if desired.)
[Note: this requires the inline javascript plugin]

{{minIMG{[img[images/image.png]]}}}<script>jQuery(".minIMG").click(function(){jQuery(this).toggleClass("minIMG");});</script>


CSS
.minIMG{
    background: url("show.png") no-repeat;
    display: inline-block;
    height: 30px;
    overflow: hidden;
    width: auto;
}
.minIMG img {
visibility: hidden;
}

and than for fast use added:
Show\Hide Img
{{minIMG{[img[$1]]}}}<script>jQuery(".minIMG").click(function(){jQuery(this).toggleClass("minIMG");});</script>
----

To the quick edit bar so all I have to do is type the path and apply.


On Friday, March 8, 2013 9:43:20 PM UTC-8, Nave Nemom wrote:
>
> I was looking for a basic plugin that allowed the expansion/minimization 
> of images in tiddlywiki. I couldn't find one so I tried to make it myself, 
> shown here: http://hobotiddly.tiddlyspot.com/. I'm not much of a 
> programmer, so it's a little amateurish. Also, if anyone knows of something 
> like this that already exists, please point me in the right direction. 
>
> The way it works is it creates a button and img element inside of a 
> preexisting div element. Pressing the button can both show and hide the 
> image. The two parameters passed to the macro are the id attribute of the 
> div and the location of the image. I'm posting about this here to see if 
> anyone knows of a smarter way to do this? For example, in order to place 
> the button and img elements in the tiddler, you have to have some 
> preexisting html (i.e. the div element) to put them in. Is there any way to 
> generate all the html from within the macro?
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to