I'm currently working on a project where some bugs are popping up in our jQuery AJAX calls. In most of these cases we have some elements that need to be initialized to do a certain thing when they're clicked (or for some other event trigger). We've decided to fix some of these issues to go with inline scripts at the end of the html instead of relying on the $(document).ready
event trigger.
This however led us to wonder what would happen if jQuery library itself (which is being loaded via google) wasn't loaded quickly enough. Particuarly with IE, will the browser intelligently wait to execute those lines of code until the jQuery library is loaded? Is a race condition in this case possible? So far most of our issues seem to present themselves in IE (even 8 and 9) or in a few cases Firefox.
EDIT:
The change from using the $(document).ready
event trigger was suggested in How can I ensure that a link's default action is always disabled? which is also related to this question's situation. It seems to be working well with the inline script at the bottom of the html. It is unclear at this time whether the issue is because jQuery isn't loading (or some other element) or if the $(document).ready
event is never triggering properly.