Function JS start when document is ready code example
Example: document ready javascript
$(document).ready(function(){
$("button").click(function(){
$("p").slideToggle();
});
});
$(document).ready(function(){
$("button").click(function(){
$("p").slideToggle();
});
});