Page 55 of JQuery Novice to Ninja shows the following code. When the page is run you CLICK on the first paragraph and the animation is triggered BUT I do not see any CLICK EVENT in this script. Isn't the document.ready function the trigger? What am I missing? I have read the forum guidelines and I do not see a specific place to ask for tech support for specific questions regarding a Sitepoint book.
$(document).ready(function(){
$('p:first').toggle(function() {
$(this).animate( {'height':'+=150px'}, 2000, 'linear')
}, function() {
$(this).animate( {'height':'-=150px'}, 2000, 'swing');
});
});





Bookmarks