A function (F1) has the implementation to access a SP list. This function gets executed and successfully accesses the SP List if this function is called in the click event of a button on the form.
However, the same function when called in document.ready() function, does execute but doesn't access the SP List.
Libraries: JSOM with jquery.