I am currently trying to learn Javascript on my own. I realise, all my websites work well when I am on localhost. However, when I deploy each page to Heroku, the Javascript seems to be not working. Is there anything that I should add to my file in order to make it work on Heroku. Something to be noted is it is just a static website and not based on the Rails language.Your help would be very much appreciated.
Below are my codes:
<html>
<head>
<link rel="stylesheet" type="text/css" href="exe6.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var number = 20;
$("img").click(function(){
$(this).css("box-shadow",'black 0px 0px ' + number +'px');
number = number + 10;
});
});
</script>
</head>
<body>
<div class="image">
<img src="img/cute_puppy.jpg" alt="">
</div>
<div class="quote">Random Sentence</div>
<div class="quote">Random Sentence</div>
</body>
</html>
css
.image
{
text-align: center;
vertical-align: middle;
}
body
{
background-color: rgb(237,210,204);
}
.quote
{
margin-right: auto;
margin-left: auto;
text-align: center;
padding-top: 30px;
font-family: Helvetica;
font-size: 20px;
}
img
{
box-shadow : white 0px 0px 50px;
}
Error given at browser's console after trying to view the website at console.
Mixed Content: The page at 'https://xxx.herokuapp.com/exe6.html' was loaded over HTTPS, but requested an insecure script 'http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js'.
This request has been blocked; the content must be served over HTTPS. exe6.html:6
Uncaught ReferenceError: $ is not defined xl.js:266 Uncaught TypeError: plugin.IsCommandKeyUndetectEnable is not a function