How to enable input onclick?
- by MID
My input is disabled on default and I want ot enable it onclick on some reference.
Here is my HTML:
<div class="field2">
<p><b>PayPal account email</b></p>
<input autocomplete="on" disabled="disabled" id="user_paypal_email"
name="user[paypal_email]" size="30" type="email" value="111">
<a href="/users/edit.6" id="#edit_email">Edit</a>
</div>
and tried this js:
$("#edit_email").click(function() {
$("#user_paypal_email").removeAttr("disabled");
});
but it doesn't work. Can someone suggest solution ?