Why certain text doesn't display
Obviously, new to Jquery. Here's the file:
- <html>
- <head>
- <script type='text/javascript' src='jquery-1.9.1.js'></script>
-
- <script type='text/javascript'>
- if ($) {
- $(document).ready(
- function() {
- $('p').addClass('Loaded');
- $('p').text('jQuery loaded and running!');
- }
- );
- }
- </script>
- <style type='text/css'>
- p.Loaded {
- color: green;
- border: 1px solid green;
- }
- </style>
- </head>
- <body>
- <p>
- jQuery is not loaded.
- </p>
- </body>
- </html>
(from a web site
http://www.java2s.com). So, the text jquery is loaded and running does appear at the top of the browser window in a long box the width of the window and it's not green and also other text does not appear. Why?
MUCH THANKS.
RON