I am building a website with several javascript-libraries included. These are slippry.js and jquery.lazyload.js
Sometimes it works without any problems, but sometimes it doesn't. For some reason these external scripts cannot be addressed from the main script.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/slippry.js"></script>
<script src="js/jquery.lazyload.js"></script>
<script src="js/script.js"></script>
It seems that sometimes it takes too long to load these scripts, zo my document.ready event is fired before slippry and lazyload is being loaded.
This is the error: Uncaught TypeError: jQuery(...).slippry is not a function