Dokument jQuery gotowy
// jQuery document ready
$(document).ready(function() {
});
Ugly Unicorn
// jQuery document ready
$(document).ready(function() {
});
document.addEventListener("DOMContentLoaded", function() {
// code
});
// A document ready block with JQery.
$( document ).ready(function() {
// we ready for fire action with JQery.
});
// A document ready block with javascript.
document.addEventListener("DOMContentLoaded", function(event) {
// we ready for fire action with javascript.
});
// Pure JS document ready ...
document.addEventListener('DOMContentLoaded', (event) => {
//the event occurred
})
document.addEventListener("DOMContentLoaded", function(event) {
//we ready baby
});
// without jQuery (doesn't work in older IEs)
document.addEventListener('DOMContentLoaded', function(){
// your code goes here
}, false);