document jquery
snippet in javascript

dom ready js

user8595

document.addEventListener("DOMContentLoaded", function() {
  // code
});

document ready

user6978

$( document ).ready(function() {
    console.log( "ready!" );
});

call a function on load jquery

user3343

$(document).ready(function () {
  // Function code here.
});

document ready without jquery

user806

document.addEventListener("DOMContentLoaded", function(event) { 
  //we ready baby
});

document. ready

user847

$( document ).ready(function() {
    console.log( "ready!" );
});

document jquery

user6349

$(function(){
  // equal to $( document ).ready(function() {
});