document ready javascript
snippet in javascript

dom ready js

user2187

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

jquery document ready

user841

// jQuery document ready
$(document).ready(function() {
    
});

document ready

user7887

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

jquery doc ready

user5311

// A jQuery( document ).ready() block.
jQuery( document ).ready(function() {
    console.log( "ready!" );
});

document ready without jquery

user6535

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

document ready javascript

user7657

$(document).ready(function(){
  $("button").click(function(){
    $("p").slideToggle();
  });
});