Jquery animate move doesnt work -
im trying animate car image on webpage. opacity command work not moving. have put image tag inside big div allow space image tag , animation.
<div class="blockone"> <div class="row blockonecomingsoon"> <h1 id="carmover" class="csoon">click see do</h1> </div> <div style="width:75%;margin:auto auto;top:10px" class="row"> <div style="width:300px;margin:auto auto"> <img style="top:10px"id="car" src="/components/pg.blocks/images/car.png" width="300" class="carplace" /> </div> </div> </div> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> </body> <body> <div class="container"> </div> <script> $(document).ready(function(){ $('#car').animate({opacity: '0.1'}); $('#carmover').click(function(){ $('#car').animate({left:'100px',opacity: '1'}); }); }); </script>
you have add position:relative img,in way
<img style="top:10px;position:relative"id="car" src="/components/pg.blocks/images/car.png" width="300" class="carplace" />
anyway there tag body in code useless in position
Comments
Post a Comment