lundi 20 avril 2015

jQuery .on is not recognizing new link elements in a warning callout

Vote count: 0

I have the following code to display an error message if someone already has a registered email address:

$output['error'] = __('Email is taken. Is that you? Try to <a href="#" data-template="login">login</a> to this site or 
<a href="#" id="extend_membership_email">extend your membership to this site</a>
<input type="hidden" id="extend_membership_email_value" value="'.$input_value.'">','userpro');

I then have the following JS to check this:

$( "#extend_membership_email" ).on('click', 'a', function(e) {
    e.preventDefault();
    alert("it is in here");
    var email_member = $('#extend_membership_email_value').val();
    alert(email_member);
});

asked 46 secs ago



jQuery .on is not recognizing new link elements in a warning callout

Aucun commentaire:

Enregistrer un commentaire