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