I would instantiate the class in the onComplete callback.... just an idea....

Remember to place width+height attributes on the images!!! (it caused
heavy headaches for me in another project!! :-)


On Wed, Oct 8, 2008 at 10:48 AM, rpflo <[EMAIL PROTECTED]> wrote:
>
> So I'm using this:
>
> http://www.magictoolbox.com/magicmagnify/
>
> magicmagnify.js grabs any images with a certain class and then turns
> them into a nice flash zoomable image. (zoomible?)
>
> I'm using Request.HTML to change the image that displays. While the
> new requested image tag still has the proper class, it doesn't get
> evaluated and then turned into the fancy pants flash zoomified image.
>
> I'm just learning javascript and mootools but I understand that when
> the page loads the magicmagnify.js finds the right images and then
> does it's thing.  When I get the request, magicmagnify.js is already
> off duty.
>
> How do I get it grab that image and do it's thing?
>
> So I've got magicmagnify.js in the head of the document and it works
> when the page initially loads.
>
> Here's my request code:
>
> var target = this.get('id');
> $$('.behind').setStyle('z-index','1');
> var req = new Request.HTML({
>        method: 'get',
>        data: { 'i' : target },
>        url: 'index.image_div.php',
>        update: $('image'),
>        evalScripts: 'true',
>        onComplete: function(response) {
>                $$('.behind').setStyle('z-index','-1');
>        }
> }).send();
>
> Here's what get's dropped into $('image')
>
> <a href="<?php echo $image_path;?>" rel="zoom-color: #333; size:
> 300px; type: circle" class="MagicMagnify"><img id="the_image" src="<?
> php echo $image_path;?>" alt="" /></a>
>
> And now I want magicmagnify.js to realize "hey, it's a new image with
> a link around it with the class of MagicMagnify, I'll do my thing like
> I did when the page first loaded."
>
> I thought that's what evalScripts: 'true' was supposed to do, but it
> doesn't.
>
> I'd be pouring over the documentation first because I'm sure I've got
> a syntax issue but it seems mootools.net is down.
>
> Thanks in advance.
>



-- 
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
www.ivanicus.com

Reply via email to