To see if an element is visible or not, you can use the visible selector with the is function:
$("#idElement").is(":visible") // true or false
But sounds to me like you want to toggle the slide effect, for that you can use the slideToggle function.