Re: Jquery
| From: | Toby Hart Dyke | Date: | Tue, 15 Feb 2011 22:22:35 +0000 |
| Subject: | Re: Jquery | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47685@lists.php.net to get a copy of this message | ||
On 2/15/2011 9:59 PM, Ethan Rosenberg wrote:
I have the following Java script program, called js_test3.html:
<html>
<head>
<script type="text/javascript" src="https://getfirebug.com/firebug-lite-debug.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>javascript Example Page</title>
<script type="text/javascript">
$(function()
{
$(document).ready(function()
{
$("button").click(function()
{
$("p").hide();
});
}
}));
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
which I cannot get to run. If I click on the text, or the button, nothing happens. The links in the program are to my son's computer, and have to be changed. I tried to link directly to the Jquery site, with no luck.
Help and advice, please.
Thanks.
Ethan
MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)]
The Javascript you've included is "https://getfirebug.com/firebug-lite-debug.js". Firebug won't run jQuery! You need something like one of these:
https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js
http://ajax.microsoft.com/ajax/jquery/jquery-1.5.min.js
http://code.jquery.com/jquery-1.5.min.js
Though if you're testing locally, you're better off downloading jQuery to your machine.
Toby