[Solved] Can we add muliple document.ready functions in a jsp page with unique API calls inside them?


Yes you can have multiple callback function on document.ready

like this

$( document ).ready(function() {
    console.log( "ready!" );
});
$( document ).ready(function() {
    console.log( "log!" );
});
$( document ).ready(function() {
    console.log( "status!" );
});

this have nothing to do with your api response

but you can not have multiple callback function on window.onload
like this

window.onload = function() {
  console.log("hello window")
};

window.onload = function() {
  console.log("hello window again")
}

because it will overweight the previous one

solved Can we add muliple document.ready functions in a jsp page with unique API calls inside them?