Hi all
There are two sets of codes written below.
Does writing “Document.ready function” multiple times or once make a difference in the performance of how fast the code will work.
In First set “document.ready function” is written multiple times at different sections of page.
$(document).ready(function() {
// some code comes here
});
$(document).ready(function() {
// some code comes here
});
$(document).ready(function() {
// some code comes here
});
$(document).ready(function() {
// some code comes here
});
In the second set “document.ready function” is written only once.
$(document).ready(function() {
// some code comes here
// some code comes here
// some code comes here
// some code comes here
});
Thanks
Vineet