check if element is show or hide jquery code example
Example: jquery see if element is visible
.is(':visible')
//Selects all elements that are visible.
if($('#yourDiv').is(':visible')){
//do stuff in here
}
//or
$('#yourDiv:visible').callYourFunction();