adding a jquery function for document ready code example
Example 1: document ready
$( document ).ready(function() {
console.log( "ready!" );
});
Example 2: jquery ready
// jQuery document ready function
$(function() {
// do stuff
});
$( document ).ready(function() {
console.log( "ready!" );
});
// jQuery document ready function
$(function() {
// do stuff
});