Custom Animation (^) ❘ 239
duration,
easing,
function()
{
animating = false;
}
);
}
}
);
$('input#exampleAnimationShrink').click(
function(event)
{
event.preventDefault();
if (!animating)
{
animating = true;
var easing = $('select#exampleAnimationEasing').val();
var duration = parseInt($('input#exampleAnimationDuration').val());
$('div#exampleDialog').animate(
{
width : '300px',
height : '200px',
marginLeft : '-160px',
marginTop : '-110px'
},
duration,
easing,
function()
{
animating = false;
}
);
}
}
);
$('input#exampleAnimationDuration').change(
function()
{
$(this).attr('title', $(this).val());
}
);
}
);
The preceding example is shown in Figure 8-4, when you click the Grow button.
http://www.it-ebooks.info
elliott
(Elliott)
#1