I have this uncaught referenceerror function is not defined error which do not understand.
If I have
$(document).ready(function(){ function codeAddr
Please check whether you have provided js references correctly. JQuery files first and then your custom files. Since you are using '$' in your js methods.