0

Using jQuery Framework in Code Playground

Ive tried calling the jQuery from a website <script type="javascript/text" src="https://code.jquery.com/jquery-3.1.1.js"></script> And I've tried calling the src=" *path to file on my desktop*" and neither of these allows my code to execute. Example <script type="javascript/text" src="https://code.jquery.com/jquery-3.1.1.js"></script> <script type="javascript/text"> function document_ready() { alert("Hello, jQuery!"); } $(document).ready(document_ready); </script>

15th Dec 2017, 8:45 PM
Stewart
2 Answers
+ 2
You forget to put this --> () after document_ready. document_ready()
15th Dec 2017, 9:02 PM
Catty
+ 1
<!DOCTYPE html> <html> <head> <title>Page Title</title> <script src="https://code.jquery.com/jquery-3.1.1.js"></script> </head> <body> <script> function document_ready(){ alert("Hello, JQuery!"); } $(document).ready(document_ready()); </script> </body> </html>
15th Dec 2017, 9:01 PM
Catty