0
Q:

document ready

// jQuery document ready
$(document).ready(function() {
    
});
15
// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
1
$( document ).ready(function() {
    console.log( "ready!" );
});
3
$( document ).ready(function() {
    console.log( "ready!" );
});
2
document.addEventListener("DOMContentLoaded", function(event) { 
  //we ready baby
});
31
// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
1
The .ready() method is typically used with an anonymous function:
$( document ).ready(function() {
  // Handler for .ready() called.
});

Which is equivalent to the recommended way of calling:
$(function() {
  // Handler for .ready() called.
});
3

New to Communities?

Join the community