jQuery Issues
When you load jQuery lib from third party domains, You may face an issue "
ReferenceError: $ is not defined
" randomly
You will get this error randomly based on loading time/different
browsers. Because Root cause of this is that you are loading
jquery.min.js from googleapis. Third party domain resources will get low
priority than the local domain resources. "document ready" function
statements will be triggered once the local domain resources are loaded.
That is why you get this error.
Permanent Solution: Put jquery.min.js file in your server and call it from your domain. this solution will work even if your page has load time issues and in any browser.
Permanent Solution: Put jquery.min.js file in your server and call it from your domain. this solution will work even if your page has load time issues and in any browser.
No comments:
Post a Comment