Also, you have multiple onReady() functions in your code which is not correct and can lead to unexpected results. Consolidate all of the code in one onReady() function.
Also, you have multiple onReady() functions in your code which is not correct and can lead to unexpected results. Consolidate all of the code in one onReady() function.