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 7807599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:54:03+00:00 2026-06-02T02:54:03+00:00

Update: found a solution, see below. I’m trying to get a clicked tile div

  • 0

Update: found a solution, see below.

I’m trying to get a clicked tile div to do a quick shrink/grow transition, so the user has some feedback the tile was clicked. I found this easy to do with CSS3 animation, but would like a jQuery alternative so it works in IE8/9.

jQueryUI effect(‘scale’) seems like a good option. This would look better as the tiles have significant text content, and just using animate() for the width/height/top/bottom won’t scale that content but just squash it together.

I have a sample that works except that the clicked tile jumps between the shrink and grow phase. Looking for suggestions on how to make the tile grow back without the little jump.

Here is my working sample (sorry no jsFiddle–this doesn’t seem to work there):

div 
{ 
    margin: 0px;  
    background: green; 
    border: 10px solid black; 
    color: white;

    width: 250px;
    height: 250px;

}

body 
{
    margin: 20px;
}


$(document).ready(function() {

$("div").click(function () {

    $(this).effect("scale", {percent: 90, origin: ['middle','center']}, 125, 
        function () {

            $(this).effect("scale", {percent: 111, origin: ['middle','center']}, 125);
          });
    });   
});


    <div><h1>hi</h1><p>blah</p></div>

Looking inside jQueryUI I’m guessing something is happening with a wrapper div being applied, but it’s a little beyond me. Any suggestions?

Here is a jsFiddle for my CSS3 effect, which shows the desired look: http://jsfiddle.net/dex3703/n2RJs/

Thanks!

  • 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-02T02:54:05+00:00Added an answer on June 2, 2026 at 2:54 am

    Found a solution–add a class with the correct layout attributes after the div is shrunken, then scale that back up. It’s ugly compared to CSS but it’s passable for a quick button-click transition. Weird thing must be some rounding going on as exactly double the shrink doesn’t restore it to the original size. Putting it to 111% works okay if you don’t look too closely.

    Suggestions or comments appreciated!

    .inner
    { 
        position: absolute; 
        margin: 0px;  
        background: green; 
        border: 10px solid black; 
        color: white;
    
    
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .innerpostmove
    {
        position: absolute; 
        top: 11px;
        bottom: 11px;
        left: 11px;
        right: 11px;
    
    }
    
    body { margin: 20px;}
    
    .container 
    
    {
        position: relative; 
        width: 250px; 
        height: 250px;
        background: purple;
    }
    
        $(".inner").mousedown(function () {
    
          $(this).effect("scale", {percent: 90, origin: ['middle','center']}, 100, function () {
    
            var item = $(this).addClass("innerpostmove");
    
            setTimeout(function () {
                item.effect("scale", {percent: 111, origin: ['middle', 'center']}, 100);
            }, 100);
    
            setTimeout(function () {
                item.removeClass('innerpostmove');
            }, 200);
    
          });
    
        }); 
    
    
    <div class="container">
        <div class="inner" ><h1>hi</h1><p>blah</p></div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: I found a solution. See my Answer below. My Question How can I
UPDATE: I actually found the solution myself, see below. In R I want to
Update Solution Found See Bottom of post if interested Seems simple enough and for
Note, I have found the solution to my problem. Please see below. I'm converting
[UPDATE] Was just an idiot mistake. See end for solution. I am trying to
Solution found, see my comment below D5, odbc to mysql database This code: with
Update : I found the solution by removing v.setFocusable(true); v.setClickable(true); in the code and
[Update: I've found the API reference. The method used is below] <?php wp_delete_post( $postid,
Big Update : As I finally found the real solution, I also discovered the
Update: I've found a partial solution in this answer here , by adding the

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.