Link to home
Start Free TrialLog in
Avatar of Peter Nordberg
Peter NordbergFlag for Sweden

asked on

Replace div with animation

I have this example code:

  <div class="steps">
            <div id="1" class="steps__moveLeft steps__moveLeft--red">              red             </div>             <div id="2" class="steps__moveLeft steps__moveLeft--green">               fd              </div>           </div>           <input type="button" value="Move Left" onclick="???" />

Open in new window

Inititially I want div 1 to be shown and div 2 to be hidden.

When I click the button I want div 2 to by animation push div 1 to the left so that div 1 becomes hidden and div 2 is shown.

How can I achieve this?

Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial