check whether or not the parent is visible

checking if the direct parent with the data attribute is visible instead of whether it has explicitly been set a "display: none;" allows for this to work with less code when you are hiding and displaying an indirect parent ancestor element with several child elements that may be containers using appendAround.