jquery if a div apper in the dom code example
Example 1: check if element is visible
.is(':visible')
//Selects all elements that are visible.
if($('#Div').is(':visible')){
// add whatever code you want to run here.
}
$('#yourDiv:visible').callYourFunction();
Example 2: jquery is element hidden
// Checks css for display:[none|block], ignores visibility:[true|false]
$(element).is(":hidden");