DeemStarr DeemStarr - 2 years ago 61
Javascript Question

jQuery Not working on my site, but works on my browser?

Running into a problem on my site that I just tried hosting, for some reason, the jQuery code that I have written is working in my browser before I hosted it via HTTPS, but when I am trying to use it via the actual site, the jQuery is not responding. The image that is clicked is supposed to bring the document back to the top of the image when it is clicked. Here is the link to the site"

Answer Source

Just replace <script type="text/javascript" src=""></script> by <script type="text/javascript" src="//"></script>

The error is due to mixing HTTP and HTTPS

Its best practive to use // instead of http ot https so that you don't need to worry about the protocol

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download