Solved

image resize animation script

Posted on 2014-11-02
8
70 Views
Last Modified: 2014-12-22
EE,
I would like to know if there is a script that can automatically resize/animate a small image to a full screen image when the page is loaded? I do not want to use Flash, but I want the tween animation during the transition.

Any help would be greatly appreciated.
dresdena1
0
Comment
Question by:dresdena1
  • 3
  • 3
8 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 40418694
0
 

Author Comment

by:dresdena1
ID: 40418695
leakim971,
Thanks for the quick response.
The link that you posted was for a slider.

What I want is to have one small image on the page that will transition to a full screen image (with tween animation) when the page is loaded.

Have you seen something like this?

Thanks again.
dresdena1
0
 
LVL 82

Expert Comment

by:leakim971
ID: 40418699
what about :

$(document).ready(function() {
   var  z =  $(window).width() / $(".myImageClass").width();
   $(".myImageClass").animate({zoom:z}, 1000); // http://api.jquery.com/animate/
});

Open in new window

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:dresdena1
ID: 40418720
leakim971,
I am not that knowledgeable with this type of thing.
Would it be possible to show me how to implement it?
Thanks.
dresdena1
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40418724
not really, it  depend of your code and page
do you understand what the code is doing ?

$(document).ready(function() { // http://learn.jquery.com/using-jquery-core/document-ready/
   // http://api.jquery.com/class-selector/
   // http://api.jquery.com/width/
   var  z =  $(window).width() / $(".myImageClass").width(); 
   $(".myImageClass").animate({zoom:z}, 1000); // http://api.jquery.com/animate/
});

Open in new window

0
 

Author Comment

by:dresdena1
ID: 40422525
leakim971,
It looks to me like it is creating a function using jquery to zoom/animate something.
Putting it into practice I am not so sure of.

I am attaching a basic page: dev.html

It has a simple image and href

If possible, please let me know how I would add in the function.
Thanks.
dresdena1
dev.html
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about why website design really matters in today's demanding market.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
This video teaches users how to migrate an existing Wordpress website to a new domain.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now