On Nov 8, 2009, at 11:25 AM, Karl Swedberg wrote:

> Are these issues with fadeIn / fadeOut any different from those with  
> slideUp / slideDown? There is a problem with repeated slide  
> animations causing the height to no longer go to the element's full  
> height if stopped in the middle. Is it possible to have a more  
> generic fix that would deal with other animations as well?

Yeah, the problem as described for fadeIn/fadeOut is almost exactly  
the same that slideUp/Down suffer from. You need to disable the queue  
(or I suppose you could just empty it manually) and pair it with  
manually animating to 0/remembered values for padding/height to get a  
smooth animation style without queue backup.

I recently worked my way around this issue by using the technique  
described under item #4 at 
<http://blog.themeforest.net/tutorials/7-things-i-wish-i-had-known-about-jquery/
 
 > with a custom built .animate() setup recently while making the  
menus on <http://chryslerllc.com>.

$('#cllc_corp_header ul.menu > li').each(function() {
        var menu = $(this).find('ul:first');
        $(this).data('menu_size', {
                'padding_top': menu.css('padding-top'),
                'height': menu.height(),
                'padding_bottom': menu.css('padding-bottom')
        });
})
.hover(function(e) {
        var menu_size = $(this).data('menu_size');
        
        $(this).find('ul').stop().css('height', 0).show().animate({
                'padding-top': menu_size.padding_top,
                'height': menu_size.height,
                'padding-bottom': menu_size.padding_bottom
        }, {queue: false, duration: 200});
}, function(e) {
        $(this).find('ul').animate({
                'padding-top': 0,
                'height': 0,
                'padding-bottom': 0
        }, {queue: false, duration: 200, complete: function() {
                $(this).hide();
        }});
});

<http://www.chryslergroupllc.com/js/cllc.core.js>

--
Phil Dokas -//- p...@jetless.org

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to