0

There's an animation I'm trying to create, I don't know what this animation is called so I'm not sure how to ask or search for what I want to do. I apologize if this has been asked here before.

Basically I want a div (square) to expand into a bigger div (square) which itself is contains 4 smaller divs (squares) when hovering, and when mouseleave it returns to the original div.

I'm not sure if this is clear.

I've tried hide(), addClass(), removeClass(), so many of them. addClass only helps me expand the div into a bigger div but I can't figure out how to include 4 smaller divs inside this expanded div.

Here's what I have so far:

JSFiddle

This is the part of the code where I try to include the four divs within expanded div:

<div class = 'expand'>
        <div id = 'a'></div>
        <div id = 'b'></div>
        <div id = 'c'></div>
        <div id = 'd'></div>
</div>
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
jason adams
  • 545
  • 2
  • 15
  • 30

0 Answers0