If you want to replace the jQuery fadeIn and fadeOut functions with jQuery Transit, you can do something like this:
$.fn.fadeOut = function(speed, callback)
{
var transitionSpeed = typeof (speed) == "undefined" ? 1000 : speed;
$(this).transition({opacity: 0 }, transitionSpeed, callback);
};
$.fn.fadeIn = function(speed, callback)
{
var transitionSpeed = typeof (speed) == "undefined" ? 1000 : speed;
$(this).transition({opacity: 1 }, transitionSpeed, callback);
};
$("div").on("click", function ()
{
$(this).fadeOut(4000, myCallBackFunction);
});
function myCallBackFunction ()
{
$(this).fadeIn(6000);
}
This is not ideal, but you can customize it to your liking.
source
share