Question

Can you please take a look at this this link and let me know why the jQuery is not working here?

I am running the page on Cloud9 ide online editor and this the code I have before </body> tag

<script src="http://codeorigin.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>
<script src="js/bootstrap.js"></script>
    <script>
       $(document).ready(function() {
          alert("This is a Test Message");
        });
    </script>

</body>

Here is the list of error on consule:
Uncaught TypeError: undefined is not a function bootstrap.js:29
Uncaught ReferenceError: $ is not defined layout.html:48

Thanks

Was it helpful?

Solution

Try changing your

<script src="http://codeorigin.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>

To

https:// instead of http://

OTHER TIPS

If you look at the warning in your browser you'll see the reason why. The problem is it refuses completely to load your jquery.js that cause $ undifined of course.

That's the warning I get :

[blocked] The page at https://c9.io/behseini/daycare/workspace/layout.html ran insecure content from http://codeorigin.jquery.com/jquery-1.10.2.js.

With that error I think you can follow that link :

Warning : The page index.html ran insecure content

Cause of your https, you have to load file on a https Try with that url maybe : https://code.jquery.com/jquery-1.10.2.min.js

Hope that's gonna help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top