Solved

image resize animation script

Posted on 2014-11-02
8
68 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

762 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

18 Experts available now in Live!

Get 1:1 Help Now