Jquery

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)]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ethan Rosenberg [ Di, 15 Februar 2011 22:59 ] [ ID #2055216 ]

Re: Jquery

--0016363ba666110b95049c5958c1
Content-Type: text/plain; charset=ISO-8859-1

I see firebug-lite-debug.js but not jquery.js. Does firebug include jquery?

David

--0016363ba666110b95049c5958c1--
David Harkness [ Di, 15 Februar 2011 23:04 ] [ ID #2055217 ]

RE: [PHP] Jquery

[snip]
I have the following Java script program, called js_test3.html:

<html>
<head>
<script type=3D"text/javascript"
src=3D"https://getfirebug.com/firebug-lite-debug.js"></script>
<meta http-equiv=3D"Content-Type" content=3D"text/html; =

charset=3Diso-8859-1" />
<title>javascript Example Page</title>
<script type=3D"text/javascript">
[/snip]

a. wrong list, see forum.jquery.com
2. you have not included the jQuery library

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jay Blanchard [ Di, 15 Februar 2011 23:10 ] [ ID #2055218 ]

Re: Jquery

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.mi n.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


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Toby Hart Dyke [ Di, 15 Februar 2011 23:22 ] [ ID #2055219 ]

Re: [PHP] Jquery

--000e0cd1e32475998d049cca668d
Content-Type: text/plain; charset=UTF-8

Hi, first, like everyone else before me told already, you forgot to load
jquery in your page.
Example :
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js
"></script>

Also, i would change your script to remove the first function that was
wrapping everything.
$(document).ready is enough.

<script type="text/javascript">// <![CDATA[
$(document).ready(function() {
$("button").click(function() {
$("p").hide();
});
});
// ]]></script>

On Tue, Feb 15, 2011 at 17:10, Jay Blanchard <jblanchard [at] pocket.com> wrote:

> [snip]
> 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">
> [/snip]
>
> a. wrong list, see forum.jquery.com
> 2. you have not included the jQuery library
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Ellis
1100101000111101

twitter.com/floverdevel
facebook.com/ellis.antaya
google.com/profiles/ellis.antaya
linkedin.com/in/ellisantaya

--000e0cd1e32475998d049cca668d--
Ellis Antaya [ Mo, 21 Februar 2011 13:56 ] [ ID #2055581 ]
PHP » gmane.comp.php.database » Jquery

Vorheriges Thema: Submitting data to MySQL database using HTML/PHP form
Nächstes Thema: data formats