I am trying to load a script with a function like:
$.getScript(\'/js/mymy.js\').done(function(){ if(readCookie(\'my_cookie\', \'yes\')){ /* do sth h
readCookie is undefined because readCookie is not global; it is visible only within the document.ready function scope in mymy.js.
readCookie
document.ready
mymy.js
Make the function global by removing the document.ready wrapper.