Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (26 sloc) 1.034 kB
<!DOCTYPE html>
<title>jQuery + CoffeeScript tutorial: animation stacking</title>
<script src=''></script>
<script src=''></script>
div.tree-frog {border: 1px solid white; height: 38px; width: 38px; position: absolute}
<div style='position: relative; width: 510px; height: 80px; background: #458008'>
<div id='ani2_worm_bar' class = 'tree-frog' style='background: #FF621D; left: 20px; top:20px'></div>
<input class='button' id='ani2_go' type='button' value='Go'>
<input class='button' id='ani2_reset1' type='button' value='Reset'>
<script type='text/coffeescript'>
$j = jQuery
$j('#ani2_go').click ->
reset = (bar) ->
bar.stop(true, true).animate( left: 20, width:38 )
$j('#ani2_reset1').click -> reset $j('#ani2_worm_bar')
Jump to Line
Something went wrong with that request. Please try again.