Hi,
I am currently reading Sitepoint’s Jquery book - Novice to Ninja, very enjoyable so far.
I am just a little stuck on chapter 3 on the animations part.
I am trying to animate text and I wrote this code:
<script type="text/javascript">
$(document).ready(function() {
$('p').animate({height: '+=40px'}, 2000, 'easeOutBounce');
});
</script>
Any ideas as to why doesn’t respond?
I have included the library and UI in my head.
I don’t know why it doesn’t work for you, because a simple test using your code works for me.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
</head>
<body>
<p>Sample text</p>
<p>More text</p>
<script type="text/javascript">
$(document).ready(function() {
$('p').animate({height: '+=40px'}, 2000, 'easeOutBounce');
});
</script>
</body>
</html>