Sorry if this has been answered before but all searches talk about the differences, not about using the two together, if possible.
Simply, can $(window).load.(function() {})
be used INSIDE of $(document).ready.(function() {})
?
I have some things that should be done after the DOM is loaded but then I want to reveal certain elements only after the images have finished loading. The only thing that works in Explorer 8, is putting the $(window).load
functions inside of the $(document).ready
with everything else.
Is this an acceptable practice?
I just want to use the most acceptable method to reveal a DIV
that contains small images, like a toolbar, after it's fully constructed. (visibility
hidden
versus display
none
, for example). The HTML for this DIV
is written by the code inside the $(document).ready
and then appended to the body using $('body').append()
before using the $(window).load
.
I'm having lots of problems with Explorer 8.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…