A cross browser/version solution to determine whether an element is visible, is to add/remove a css class to the element on show/hide. The default(visible) state of the element could be for example like this:
<span id="span1" class="visible">Span text</span>
Then on hide, remove the class:
$("#span1").removeClass("visible").hide();
On show, add it again:
$("#span1").addClass("visible").show();
Then to determine whether the element is visible, use this:
if ($("#span1").hasClass("visible")) { // do something }
This also solves the performance implications, which may occur on heavy usage of the ":visible" selector, which are pointed in jQuery's documentation:
Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance.