Hi
Taking your suggestion on board I've reworked the the code so that fancybox calls an iframe and the zoom script is fireing from within the iframe. However it is still not working the image appears but the is no magnification on mouse hover.
I'm unable to show you a live website as i'm at the developent stage which is also why id's etc are hard coded. I can upload the two files the first img.html contains jQuery / Fancybox Code sending a link to GetImg.php that has the zoom code.
it seems that if i don't load the jquery.js inside the iframe firebug reports an error saying $ or jQuery is a function I also had ddpowerzoomer.js in the parent file but that didn't make any differance either.
I'd apreciate if some one would be kind enough to look and tell me what i'm doing wrong and there isn't some kind of incompatilbility between fancybox and powerzoomer
Thanx for your help
Holly
img.htm
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<!-- Add jQuery library -->
<script type="text/javascript" src="fancyBox-2.0.6/lib/jquery-1.7.2.min.js"></script>
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="fancyBox-2.0.6/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="fancyBox-2.0.6/source/jquery.fancybox.js?v=2.0.6"></script>
<link rel="stylesheet" type="text/css" href="fancyBox-2.0.6/source/jquery.fancybox.css?v=2.0.6" media="screen" />
<!-- Add Button helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="fancyBox-2.0.6/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" />
<script type="text/javascript" src="fancyBox-2.0.6/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
<!-- Add Thumbnail helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="fancyBox-2.0.6/source/helpers/jquery.fancybox-thumbs.css?v=1.0.2" />
<script type="text/javascript" src="fancyBox-2.0.6/source/helpers/jquery.fancybox-thumbs.js?v=1.0.2"></script>
<!-- Add Media helper (this is optional) -->
<script type="text/javascript" src="fancyBox-2.0.6/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'GetImg.php?img=/images/listenmusic.jpg',
type : 'iframe',
padding : 5
});
});
}) ; // ready
</script>
</head>
<body>
<p>
<a id="fancybox-manual-b" href="javascript:;" title="A witty Title">Graphic A</a>
</p>
</body>
</html>
GetImg.php
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Holly Gibbons</title>
<script type="text/javascript" src="fancyBox-2.0.6/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/ddpowerzoomer.js"></script>
<script type="text/javascript">
jQuery('#image3').addpowerzoom({
defaultpower: 2,
powerrange: [2,5],
largeimage: null,
magnifiersize: [100,100] //<--no comma following last option!
});
</script>
</head>
<body>
<?php
$my_img = $_GET['img'];
?>
<p> <img id="image3" src = <?php echo $my_img ?> /></p>
</html>
Bookmarks