I tried $ .isshown () but this function doesn't exist
I think this should work:
$(elem).is(":visible");
use a :visible selector:
:visible
if($('div#target:visible').length){ alert('target is visible'); }
edit: use Quintin Robinson's solution, it's much clearer