check the visabilty between two elements jquery and hide element if elements inbetween aren't visible code example
Example: jquery is element hidden
// Checks css for display:[none|block], ignores visibility:[true|false]
$(element).is(":hidden");
// Checks css for display:[none|block], ignores visibility:[true|false]
$(element).is(":hidden");