Closed zh99998 closed 11 years ago
This can already be accomplished:
$("#logo").transition({ opacity: 1 }, function() {
$(this).addClass('done');
});
@rstacruz your code is just adding class "done" after the transition is finished, but I think that @zh99998 is actually speaking of using the class' css for transition. Something like:
$(this).css("transition", "all 0.5s");
$(this).addClass("newState");
like jQuery UI allows addClass with duration http://api.jqueryui.com/addClass/
i prefer creating a CSS class by transit, and add this class to any jQuery Object. but now we should create a function to do that. @keyframes xxx{} & function(){ $box.transit} Excuse my poor English.
transit works perfectlly in small projects, but if UI is more complex, it's better to define styles in css and transform to a class...