PDA

View Full Version : Problem with Image Magnify



ZermattMan
08-28-2012, 12:30 AM
Script: :: jQuery Image Magnify v1.11
http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm

I am not sure if this is the right place to put this; problem may be in JScript, XML CSS... But here goes:

Image magnifier works fine when put straight onto HTML page.
i.e. This is fine:
<img src="POW.jpg" class="magnify" style="width:200px; height:150px">

But when I embed this in XML string, like so:
&lt;img src="POW.jpg" class="magnify" style="width:200px; height:150px" &gt;
the image appears, and the style is applied, but "magnify" is ignored.

The XML is data to the Simile Timeline JS library.


I have put all the relevant files into the same directory in an attempt to remove some variables!

Any help for this poor benighted newbie would be much appreciated!


Andrew McGurk

ddadmin
08-28-2012, 12:53 AM
I reckon the contents shown inside Simile Timeline are all dynamically generated, which would explain why the Image Magnify script doesn't work in it. Basically, the later script is initialized when the page first loads- if an image with
class="magnify" is injected into the page afterwards, the script is unable to pick up on that. There are ways to rectify that of course, but exactly how depends on familiarity with Simile Timeline as well (which I'm not). If I have time and if this is very important, I'll try and take a look at the Timeline script in the next couple of days.

ZermattMan
08-28-2012, 03:17 AM
Thank you for your quick response. What you say rings a bell with what I have read elsewhere; and I think you are right.

Meanwhile I have tried the CSS Smart Image Enlarger, and it worked straight away. However, it pops up the image inside the window which Simile has generated for the XML code.
As I should have expected! I guess I will have to go back to basic principals and launch a window with my enlarged image.

I think I tried this before with mixed success. But I should be able to do it.

Thank you, again.

Amdrew McG