[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-13 Thread Ricardo
That doesn't make any sense. The callback will only execute after the slideUp finishes, so this gives you a 1s delay. Massimiliano, could you provide a test page? I don't understand why you're animating an element which is invisible (0 opacity). On May 13, 2:22 am, waseem sabjee wrote: > I have

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-13 Thread hjb
and instead of parents - you should be using closest('.item- container') On May 13, 2:45 pm, hjb wrote: > I'll have a go: > > function removeChekbox(data) > { >     $.each(data, function(i, val) >     { >         $('input[value="'+val+'"]').parents(".item-container").fadeTo > ("slow", 0, funct

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-13 Thread hjb
I'll have a go: function removeChekbox(data) { $.each(data, function(i, val) { $('input[value="'+val+'"]').parents(".item-container").fadeTo ("slow", 0, function() { $(this).slideUp(500, function() { $(this).remove(); }

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-13 Thread Massimiliano Marini
> I have made a slight change in your code. also note you did set the > opacity to 0 before the slideUp that could effect your code [snip] > i just added a 0.5 sec delay the same with your changes, the slideUp() still not working. -- Massimiliano Marini

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-13 Thread Massimiliano Marini
> Maybe it's because opacity is already 0? > > Try using animate({ height:'toggle' }) instead I've tried your code, but the behavior is not what I'm trying to achieve. The slideUp() still not working. -- Massimiliano Marini

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-12 Thread waseem sabjee
I have made a slight change in your code. also note you did set the opacity to 0 before the slideUp that could effect your code > function removeChekbox(data){ > $.each(data, function(i, val){ > $('input[value="'+val+'"]').parents(".item-container").animate({opacity: 0.0}, "slow", function(){

[jQuery] Re: slideUp() does not make animation before remove() occurs

2009-05-12 Thread Ricardo
Maybe it's because opacity is already 0? Try using animate({ height:'toggle' }) instead On May 12, 2:16 pm, Massimiliano Marini wrote: > Hi all, > > I'm using jQuery 1.3.2 that's the code: > > function removeChekbox(data){ >  $.each(data, function(i, val){