Q:

js document ready

document.addEventListener("DOMContentLoaded", function() {
  // code
});
9
// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
1
$( document ).ready(function() {
    console.log( "ready!" );
});
3
// A jQuery( document ).ready() block.
jQuery( document ).ready(function() {
    console.log( "ready!" );
});
14
document.addEventListener("DOMContentLoaded", function(event) { 
  //we ready baby
});
31
$( document ).ready(function() {
    console.log( "ready!" );
});
2
$(document).ready(function(){
  $("button").click(function(){
    $("p").slideToggle();
  });
});
0
// jQuery document ready function
$(function() {
 // do stuff
});
4

New to Communities?

Join the community