Sorry for the slow response time. I never quite got this working using
fancyzoom(), so I just used a bit of Jquery. Not being a programmer myself, I'm
sure this could be greatly improved.
$("body").append('<div id="zoomed"></div>');
$("#zoomed").hide();
$("div.thumbnail").click(function(){
$("#zoomed").empty();
$("#zoomed").html($(this).html());
var newtop = $(window).scrollTop() +
($(window).height()/2 - $("#zoomed").height()/2);
$("#zoomed").css("top", newtop);
$("#zoomed").fadeIn("fast");
});
$("#zoomed").click(function(){
$(this).fadeOut("fast");
});
Bob's Stayton's method for matching <mediaobjects> with role='thumbnail' works
perfectly.
<xsl:template match="d:mediaobject[@role = 'thumbnail']"
mode="class.value">
<xsl:value-of select="'thumbnail'"/>
</xsl:template>
Everything else is done by tweaking the CSS for #zoomed and div.thumbnail. I
have the thumbnails all sized about 200px and floating to the right. This has
really helped clean up some HTML docs that are very image heavy.
-----Original Message-----
From: Fekete Robert [mailto:[email protected]]
Sent: Tuesday, March 13, 2012 8:43 AM
To: [email protected]; David Goss
Subject: Re: [docbook-apps] Assigning an ID and a class to <mediaobject> HTML
output
Hi David, in case you managed to get it working, would you share your
results/experiences with us? I'd love to try something similar on our docs.
Regards,
Robert
On 03/06/2012 07:35 PM, David Goss wrote:
> I would like to use a Javascript fancyzoom() with images in a Docbook
> HTML output. Basically, all the images would float right and be of
> equal width, and could be clicked to zoom.
>
> My problem is that setting xml:id='theimagename' and role='thumbnail'
> in mediaobject (or imageobject and imagedata) doesn't seem to add an
> id or a class to the HTML output. Is there some way I can explicitly
> tell the transformation sheet that I want the id and class in the output?
>
>
> DAVID GOSS | Technical Writer
> P 1.800.876.9218 x 345 | F 1.800.588.9866 [email protected]
> http://www.MuellerReports.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail:
> [email protected]
>
>