Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9245243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:13:23+00:00 2026-06-18T09:13:23+00:00

I am trying to achieve photo zooming effect using this example: http://www.tympanus.net/Tutorials/PhotoZoomOutEffect/ . However,

  • 0

I am trying to achieve photo zooming effect using this example: http://www.tympanus.net/Tutorials/PhotoZoomOutEffect/ .
However, I needed to make this effect working after page load, not on hover.
So I changed hover() to ready():

    $(function() {
        $('#container img').ready(
            function(){
              var $this = $(this);
              $this.stop().animate({
                  'opacity':'1.0',
                  'height':'200px',
                  'top':'0px',
                  'left':'0px'
              });
           },
           function(){
             var $this = $(this);
             $this.stop().animate({
              'opacity':'0.5',
              'height':'500px',
              'top':'-66.5px',
              'left':'-150px'
             });
           }
        );
    });

And then I had the JS error in Chrome debugger:
Uncaught TypeError: Cannot use ‘in’ operator to search for ‘display’ in undefined
Could someone, please, give me a hint to resolve this issue?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:13:24+00:00Added an answer on June 18, 2026 at 9:13 am

    you can do it like this if you have images with different dimensions

    $(document).ready( function(){
        img = $('#container img');
        imageWidth = img.outerWidth();
        imageHeight = img.outerHeight();
        centerX = (200 - imageWidth) / 2;
        centerY = (200 - imageHeight) /4;
        img.css({'opacity': 0.5, 'top': centerY, 'left': centerX})
           .animate({'opacity': 1,'height': '200px', 'top': 0, 'left': 0});
    });
    

    you need to set some values in CSS:

    #container {
          width: 200px;
          height: 200px;
          overflow: hidden; /*important*/
    }
    #container img{
        position: relative; /*important*/
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

iam trying to achieve this exact functionalty: http://jsfiddle.net/exttq/ BUT inside using my PHP, right
I am trying to achieve this effect where a photo gets a repeating pattern
I'm basically trying to achieve this effect. It can be done with pretty much
I am trying to replicate the canvas texture style effect on a photo using
I am trying to achieve a slideUp into view effect, with scrolling. This is
Trying to achieve any moving effect while appending an element from one to another
I am trying to achieve an effect of overlapping the main window boundary with
I am trying to achieve something like this. The Expandable List consists of the
I'm trying to take a photo with this code: capturarFoto.setOnClickListener(new View.OnClickListener() { @Override public
I'm trying to achieve a cascading UPDATE and DELETE effect in a MyISAM database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.