If I hide some elements on page_load using jquery, the elements flicker for a split second when the page posts and then disappear:
function pageLoad() {
$('#panelOne').hide();
$('#panelTwo').hide();
Is there a way to prevent the flickering?
I don’t want to set the elements css to visibility: hidden, because then calling the jquery .show() method later on doesn’t seem to show the element.
Setting
visibility: hiddendoesn’t work, butdisplay: nonedoes. See jsFiddle.You could do this on the DOMReady event, but it would be cleaner to do it in CSS.