How many $(document).ready() function can we use in a single html file or in a single javascript file?
$(document).ready(function(){
alert("first document ready");
//do some action here
});
$(document).ready(function(){
alert("second document ready");
//do some action here too
});
If we can use infinite, how will they be invoked? Will they execute line by line or is there any algorithm for calling this?
I found a very nice answer about it in stackoverflow itself
https://stackoverflow.com/a/1327766/1225190
Here is some more reference about it
Multiple $(document).ready()
Tutorials:Multiple $(document).ready()