Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

image resize animation script

Posted on 2014-11-02
8
Medium Priority
?
77 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 83

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 83

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 83

Accepted Solution

by:
leakim971 earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

927 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