I am trying to animate an element without jquery making it display:none
is there anyway to do it ???
and also when I just have the sibliings() opacity:0
the ul opacity wouldn’t go back to 1 ?
is it because widht:’show’ can’t be used along with opacity ?
thanks heaps !
jquery:
$("#nav li ").click(function(){
$(this).find(">ul").dequeue().animate({width:'show',opacity:1},300);
$(this).siblings().find(">ul").dequeue().animate({width:'hide',opacity:0},300);
});
2nd version ul opacity wouldn’t go back to 1:
$("#nav li ").click(function(){
$(this).find(">ul").dequeue().animate({width:'show',opacity:1},300);
$(this).siblings().find(">ul").dequeue().animate({opacity:0},300);
});
Using hide, show or toggle will change the display properties, try using width ‘0’ and then animate back to the original width again instead.