Question: uncaught referenceerror $ is not defined in ajax call?
Answer: You are using jQuery tag before jQuery is loaded. It could be that you have your script tag called before the jquery script is called. It will result in $ is not defined. Change the sequence and it should work fine. So dependent script should be included after jQuery.