Вместо обычного присваивания класса, мы получаем визуальный переход. Чем-то похоже на .animate().
The addClass function in UI can take 3 arguments.
$( "#myDiv" ).addClass( "red", 500, callback);
"red" is the class to add to myDiv,
500 is the time for the animation to happen,
callback is the optional function to run at the completion of the animation.
$(function() {
$( "#button" ).click(function() {
$('#writing').addClass("transition",1000,callbackFunction());
});
function callbackFunction() {
setTimeout(function() {
$('#writing').removeClass("transition");},
1500 );}
});
Изменяет свой размер при нажатии кнопки.

_____________________________________________________________________________________