[jQuery] Delaying a .css until an animation on a different div is done?
Hey,
I have a button set up to fade out and then hide a div within a div.
The parent div has a 1px border, but it looks odd to have the border
float while the inside div fades away. I would like to set it up so
the border goes to "none" then after the inside div fades and hides
the border goes back to "1px solid black".
$('.miniThis').click(function(){
$(this).parents(".window").css("border","none");
if($(this).parents("h1").siblings(".content").css("opacity") == "0")
{
$(this).parents("h1").siblings(".content")
.show()
.animate({"opacity": "1"}, 300);
} else {
$(this).parents("h1").siblings(".content")
.animate({"opacity": "0"}, 300)
.hide(1);
}
$(this).parents(".draggableWindow").css("border","1px solid black");
});
I've tried using "setTimeout" and ".animate" instead of css, but both
to no prevail.
Help is highly appreciated,
-CodingCyb.org