Currently, I am attempting to incorporate simpleWeather.js from the website simpleweatherjs.com into my own website.
However, upon inserting the html code onto my website, an error message pops up:
Uncaught TypeError: $.simpleWeather is not a function
I have made sure to reference simpleWeather.js at the beginning of my html file:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js"></script>
The script does load successfully on my website:
https://i.stack.imgur.com/iXqEp.png
Interestingly, it functions flawlessly on codepen.io. Any thoughts on why this might be happening?
EDIT:
This is the complete code snippet that I am using:
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js"></script>
<script type="text/javascript">
//JavaScript code copied from codepen.io
</script>
<style type="text/css">
//CSS styles copied from codepen.io
</style>
//HTML structure copied from codepen.io