I want to simplify things in my jQuery Backbone.js web application. One such simplification is the behavior of my menu and dialog widgets.
Previously I created the div boxes of my menus at start and hid them using
display: none; opacity:0;
I'm not aware of any performance difference between
visibility:hidden - even if there is, for as little as 10 elements it will be completely negligible. Your main concern should be, as you say, whether you want the elements to remain within the document flow, in which case
visibility is a better option as it maintains the box model of the element.