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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:17:24+00:00 2026-05-25T15:17:24+00:00

Am developing a game using HTML5 and CSS3. I have a bunch of divs

  • 0

Am developing a game using HTML5 and CSS3.

I have a bunch of divs that have CSS3 animations attached to them on hover events. The game is a basic match the tiles/cars game. This is -webkit- only so runs best in Chrome.

Here is a preview : http://tinyurl.com/3ry2bgn

I want to attach game logic but am stumped on what approach to take.

Can I just attach additional ids to the DIVs and use JavaScript to just check that?

How can I make the animations animated onClick events? Or better on tap events for the iPad?

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-05-25T15:17:24+00:00Added an answer on May 25, 2026 at 3:17 pm

    To control CSS3 animations via Javascript, the best thing to do generally is to place the animation style in a class, and then add that class in the onClick event handler.

    You can use animation events to detected the end of the animation and remove the class, so that the animation relaunches on subsequent events, or you could just check in each onClick event if the class has already been added, and then if it has, remove it before reading it.

    Although you are using a Webkit-based browser, the Mozilla Developer Reference CSS Animations Page is still an excellent reference — just replace the -moz- vendor prefix with -webkit- 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing game editor in c++.I have implemented reflection mechanism using DiaSDK.Now I
I'm developing a game that I will distribute using Java Web Start / JNLP.
I am developing a game for Windows Phone 7 using XNA, and I have
I am developing an app that reports a score to Game Center using the
Hi I am developing a game using libgdx framework, in that i am unable
I am developing a game in which I am using Landscape mode I have
I'm developing a physics game using AndEngine with box2d physics engine. I have a
I'm developing a game for iPhone using COCOS2D . In that, I need to
I have been developing a game using Flex, and used the Timer class to
I am developing an iphone game using cocos2d and have it set to to

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.