One of the advantageous features of jQuery UI is its enhancement of the jQuery addClass
method, which enables animation by including a second parameter for 'duration', as shown below:
$('div').addClass('someclass', 1000);
This works smoothly for CSS properties like color
, background-color
, width
, height
, etc.
However, transitions such as visibility:hidden
-> visibility:visible
and display:none
-> display:block
do not fade in gracefully as expected. They simply appear when the duration is complete after adding the class.
I vaguely recall seeing smooth transitions with these CSS types in jQuery UI before. Does anyone else know if this is or has been achievable?
Although I'm familiar with the fadeIn
and fadeOut
methods, as well as the animate
method, I prefer to prioritize my stylesheets over loading my scripts with style animation logic.
CSS3 transitions can achieve the same effect, but I am seeking a more widely supported solution.