Hello all,
When some new list item is added I want it to 'blink' by animating adding a class and removing it after on the callback.
This is the code:
$li.addClass('new', 1000, function() {
$li.removeClass('new', 500);
});
Css:
#galleries-list li {
margin-top: 10px;
background-color: #EEFFFF;
border: 1px solid #99FFFF;
}
#galleries-list li.new {
background-color: #DDFFBB;
border: 1px solid #99FF66;
}
UPDATE:
I found what went wrong. When I removed the fadeOut it works. I have no idea why. Maybe you can check this and sent it to the jQuery UI dev's.
$('input, img', $li).fadeOut(150, function() {
$gallery.set($li, name, 0); //Clears html and sets gallery name and image count
$li.addClass('create', 2000, function() { $li.removeClass('create', 500); });
});