Thanks iBall - this works nicely:
http://www.suresure.co.uk/Temp/ICA.html
I've applied the function to all images (this suits me):
Code:
window.onload=function(){
var imgsO = document.getElementsByTagName('img');
for(i=0; i<imgsO.length; i++){
imgsO[i].enlarged = false;
imgsO[i].onclick=function(){toggleImgSize(this);}
}
}
and added scale to the css instead of pixel width:
Code:
<style type="text/css">
img{
transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
-o-transform: scale(1);
}
</style>
Does that seem appropriate? I'm wary of making some kind of mistake here by interfering too much...
And yet another question! I'd like to introduce a change of cursor - I've added this to the first image:
Code:
<img src="ICA 5.svg" OnMouseOver="this.style.cursor='pointer';" OnMouseOut="this.style.cursor='auto';"/>
but is there a nice way to add this to the style tag so all images adopt the pointer cursor? I'm sorry to drag this out, thanks again!