- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Image Zoom
Hi there,
I was hoping someone here could help with this problem im having. I’ve managed to set up an image for when the user rolls over it, it zooms out. I would like to add the same functionality to a button, so when the user rolls over that button the image zooms out, but i can’t seem to get the darn thing to work.
I’ve set up a fiddle to help explain what i mean. http://jsfiddle.net/CameronDuthie/byrHL/
Any help would be greatly appreciated,
Many Thanks,
Cameron
well,just change the
$(‘#right img’).hover to $(‘.btn-torq’)
$this=$(this) to $this=$(‘#right img’)
Bytheway, great idea, amazing effect.
@jozsef Thank you so much for your help i really appreciate that. It works a treat, I’m a complete novice when it comes to javascript. Thanks for the compliment. :)
@kgscott284 Thanks for the advice and your comment. What advantages are there with using % over px? I’m not sure what you mean by flexible?
Does this help you out: http://jsfiddle.net/savver/byrHL/4/ or maybe this: http://jsfiddle.net/savver/byrHL/5/ or even more flexible: http://jsfiddle.net/savver/byrHL/6/
Yes, many thanks @vermaas. I think i now have a clearer idea of what flexibility means in javascript.