0
Q:

document ready js

document.addEventListener("DOMContentLoaded", function() {
  // code
});
9
// 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
// A jQuery( document ).ready() block.
jQuery( document ).ready(function() {
    console.log( "ready!" );
});
14
$( document ).ready(function() {
    console.log( "ready!" );
});
2
document.addEventListener("DOMContentLoaded", function(event) { 
  //we ready baby
});
31
$(document).ready(function(){
  $("button").click(function(){
    $("p").slideToggle();
  });
});
0
<!doctype html>
<html>
<head>
</head>
<body>
Your HTML here

<script>
// self executing function here
(function() {
   // your page initialization code here
   // the DOM will be available here

})();
</script>
</body>
</html>
0

New to Communities?

Join the community