I have a javascript function that tries to determine whether a div is visible and does various processes with that variable. I am successfully able to swap an elements visibilit
Display is not an attribute, it's a CSS property inside the style attribute.
style
You may be looking for
var myvar = document.getElementById("mydivID").style.display;
or
var myvar = $("#mydivID").css('display');