<!-- define Magic Zoom Plus -->
<a href="images/harley1c.jpg" id="zoom" title="Cool bike!" class="MagicZoomPlus"><img src="images/harley1b.jpg"/></a>
<br/>
<!-- stop some particular Magic Zoom (by ID) -->
<input type="button" onclick="MagicZoomPlus.stop('zoom');" value="Stop zoom"/>
<!-- start some particular Magic Zoom (by ID) -->
<input type="button" onclick="MagicZoomPlus.start('zoom');" value="Start zoom"/>
<br/><br/>
<!-- update zoom manually (first approach) -->
<script>
function changeImages1(){
// apply new changes to our zoom (and only this zoom)
// new settings passed in the last parameter to update() function
// will only extend existing settings
MagicZoomPlus.update('zoom', 'images/harley2c.jpg', 'images/harley2b.jpg', 'show-title: false');
}
</script>
<input type="button" onclick="changeImages1();" value="Switch images"/>
<!-- update zoom manually (second approach) -->
<script>
function changeImages2(){
var zoom = document.getElementById('zoom'); //get the reference to our zoom object
zoom.href = 'images/harley1c.jpg'; //change the big image
zoom.rel = 'zoom-height: 170px'; // enable zoom drag mode
zoom.firstChild.src = 'images/harley1b.jpg'; //change the small image
// refresh ALL zooms on the page
MagicZoomPlus.refresh();
}
</script>
<input type="button" onclick="changeImages2();" value="Switch images back"/>