How to check display (none/block) of a div in jquery?

I am using this,

$("#loginanchor1").click(function (e) {
    e.preventDefault();
    $("#signin_menu1").slideDown("slow");
});
$(document).mouseup(function (e) {
    if ($(e.target).parent("a.loginanchor1").length == 0) {
        //$(".signin").removeClass("menu-open");
        $("#signin_menu1").slideUp("slow");
    }
});

Everything works fine but what happens is when the signin_menu1 is displayed block and i click my mouse button inside the div the div slidesup... I want mouseup function to be prevented when the signin_menu1 is displayed block. So i thought of changing the condition like,

if(($(e.target).parent("a.loginanchor1").length==0) &&( //check the display of the div)

Now how to check the display?

11
задан Reigel 23 September 2010 в 07:15
поделиться