Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   не работает фун-я animate (https://javascript.ru/forum/jquery/45812-ne-rabotaet-fun-ya-animate.html)

gpg10 17.03.2014 13:29

не работает фун-я animate
 
<!DOCTYPE html>
<html>
<head>
<style>
div {
  background-color: #bada55;
  width: 100px;
  border: 1px solid green;
}
p {


  width: 300px;
  height: 100px;
  border: 1px solid green;


}
</style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>

<script src="jquery.color-2.1.2.min.js"></script>
<script src="jquery.easing.1.3.js"></script>
<script src="jquery-2.0.2.min.js"></script>

</head>
<body>
<p>FFFFFFF</p>
<button id="go">Simple</button>
<button id="sat">Desaturate</button>
<div id="block">Hello!</div>

<script>
jQuery("#go").click(function(){
  jQuery("#block").animate({
      backgroundColor: "#FFFF00"
  }, 1500 );
});
jQuery("#sat").click(function(){
  jQuery("#block").animate({
      backgroundColor: jQuery.Color('#7CFC00') 
  }, 1500 );
});
</script>
<script>


$( 'p' ).click(function() {
 $(this).animate({ top: '-=10px' }, 600, 'easeInOutElastic', function () { … })
  });



	
</script>

</body>
</html>

рони 17.03.2014 15:29

gpg10,
уберите точки в строке 49 и поставьте нормальное значение в строке 41 и выкините лишние скрипты jquery


Часовой пояс GMT +3, время: 16:41.