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

  • SEARCH
  • Home
  • 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 7673847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:36:24+00:00 2026-05-31T16:36:24+00:00

I’m brand spankin’ new to Javascript. Here’s what I want to do. I want

  • 0

I’m brand spankin’ new to Javascript. Here’s what I want to do. I want an array of square tiles covering the window and I want them to flip over when the mouse goes over them. I already have a single tile. See the Jsfiddle below.

http://jsfiddle.net/V7cS8/

I would like it so that the tile will flip over completely to the back side, even if the user doesn’t hover for the entire animation length (basically, even if the hover is only very brief, I want it to commit to rotating). I want it to hold its flipped state for some minimum amount time and then return if the user is no longer hovering.

Should I be trying to do this entirely in javascript or still using a lot of CSS?

  • 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-05-31T16:36:25+00:00Added an answer on May 31, 2026 at 4:36 pm

    You don’t need JavaScript/jQuery at all. Replace all .flip references in your CSS by :hover: http://jsfiddle.net/V7cS8/1/

    For delays, you can use transition-delay: 1s.

    Apply transition-delay:1s; (delay 1 second, with vendor prefixes) to the normal selector, and transition-delay:0s to the :hover selector. The result is that the backflip will be delayed for 1 second.

    Demo: http://jsfiddle.net/s9xcP/2/

    Outcome of comment chain: When existing animations have to be completed first, regardless of the hover state, a JavaScript timeout have to be used:

    Demo: http://jsfiddle.net/nY8U8/224/

    $(function(){
        $('.box').hover(function(){
            var $this = $(this);
            
            // If not not-ready, do nothing
            // By default, the value is `undefined`, !undefined === true
            var not_ready = $this.data('box-hover-not-ready');
            if (!not_ready) {
                $this.addClass('hover');
            } else {
                // If bosy, defer hover transition
                $this.data('box-hover-hovered', true);
            }
        }, function() {
            var $this = $(this);
            $this.removeClass('hover');
    
            // Mark state as "busy"
            $this.data('box-hover-not-ready', true);
            var timeout = setTimeout(function() {
                var hovered = $this.data('box-hover-hovered');
                if (hovered) {
                    // If a hover transition is deferred, activate it now.
                    $this.addClass('hover');
                    $this.data('box-hover-hovered', false);
                }
                // Mark state as "not busy"
                $this.data('box-hover-not-ready', false);
            }, 2000); /* 2 seconds*/
            
            // Remove previous timeout, set new one.
            clearTimeout($this.data('box-hover-timeout'));
            $this.data('box-hover-timeout', timeout);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am confused How to use looping for Json response Array in another Array.
I used javascript for loading a picture on my website depending on which small
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm interested in microtypography issues on the web. I want a tool to fix:
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.