It might help if you moved the jQuery code out of the HTML. It would help
you focus on each seperately which could assist you in finding the problem.
Plus, if you're just going to use jQuery inline, then why bother with using
it at all?


andy

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Miri
Sent: Wednesday, November 05, 2008 10:53 AM
To: jQuery (English)
Subject: [jQuery] "on click" doesn't work!


Hi everyone!
I've been trying to find the problem in the code below, but I have no idea
what it is.
The problem is with the "on click" option - it just doesn't work..
Can anyone please help me?!?!
Thanks very much in advance..
Miri.

The code:
#
<div id="myform">
#
  <h3>Do you want to subscribe to our newsletter?</h3> #

#
  <form>
#
    <input onclick="javascript: $('#email').show('slow');"
type="radio" name="subscribe" value="1" /> #
    <label>Yes, I want to subscribe</label> #
    <br />
#

#
    <input onclick="javascript: $('#email').hide('slow');"
type="radio" name="subscribe" value="0" /> #
    <label>No, thanks</label>
#
    <br />
#

#
    <div id="email">
#
      <label>Email Address: </label>
#
      <input name="email" type="text" /> #
    </div>
#
  </form>
#
</div>


Reply via email to