Answers for "dom loaded vs document ready"

16

js vanilla dom ready

document.addEventListener("DOMContentLoaded", function() {
  // code
});
Posted by: Guest on April-02-2020
-2

document ready javascript

$(document).ready(function(){
  $("button").click(function(){
    $("p").slideToggle();
  });
});
Posted by: Guest on September-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language