The best way to accomplish this is to use JQuery to select the image, make it smaller, then redirect the window to the page you want. If you haven't heard of JQuery, it's basically a library and set of utilities that sits on top of stock JS to accomplish many common patterns in Javascript. It is widely used in the web development industry and allows you to avoid using a lot of boilerplate code and makes more complex animation and AJAX trivial. Here's a link to the
API docs.
From what it sounds like, you have a large image that you want to shrink with animation and then redirect the browser to another page. Without seeing your code exactly or knowing your specific use case, it is difficult to provide a lot of help, but I'll try. It would be helpful if you uploaded it.
Use the
method in JQuery to trigger a
method that modifies the CSS of the image to the state you want. Then call the standard Javascript
or
Code:
window.location.href("URL")
to load the new page.
I hope that answers your question, but again, it's tough to give specific feedback without the code you already have. Good luck with your website!