dom readdy js code example
Example 1: document ready javascript
$(document).ready(function(){
$("button").click(function(){
$("p").slideToggle();
});
});
Example 2: wait for the dom to load javascript
document.addEventListener('DOMContentLoaded', (event) => {
//the event occurred
})