External Jquery not working

Permalink
I am creating a jquery file externally in js/jquery.js and I tested my jquery code the night before with an alert. Which successfully worked. I got up in the morning to begin my project and all the sudden Jquery is no longer working? Any ideas?

<script type="text/javascript" src="<?= $view->getThemePath() ?>/js/jquery.js"></script>

Something on the external file is causing this because jquery works when placed before the closing body tag.

 
SeanDevoy replied on at Permalink Reply
This is sort of old, but I will respond anyway.

Check the source code that is generated and sent to the browser (view source). Is it the correct path? Does that file exist?

Also check the browser console for errors.
PM me the url and I will have a look.

Sean
ramdettmer replied on at Permalink Reply
Thanks for getting back to me. I just figured it out, it seems it does not work right away so I have to wait a few minutes for the code to work. Which is odd because I've never had to wait before.
SeanDevoy replied on at Permalink Reply
I am curious. do you mean you have to wait for an asynchronous file load by the browser, like a few seconds? Or do you mean you must wait for file caching to expire?
ramdettmer replied on at Permalink Reply
I'm not too positive what may be causing this. I'm using chrome but I'm assuming its the file loading for the browser. It seems declaring an alert takes more time for the browser to process it while using selectors takes less time.