On the front page of our site using flash I have built a smooth zooming in to the image as you can see, where the fo开发者_如何学JAVAcal point moves in and then stops after a few seconds. I am wondering if there is a way to do this in JavaScript (ideally JQuery), as I would like to implement it later in the site but without flash...
Thanks in advance for any help!
Cheers, Shadi
Yes, there are many jQuery plugins that do this, and some do a lot more. I did a google search for "jquery zoom image" and this is the first thing that showed up that seemed to do the job:
http://www.eyecon.ro/zoomimage/
The other basic concept is using jQuery's animate()
function that can make you animate the change in width and height. You would have to have a container over the image that has the CSS property overflow: hidden
. This would allow you to expand the image to whatever dimensions you want.
精彩评论