javascript - Captcha on change for span -


hi goal show submit-form once attribute changes.

<span class="recaptcha-checkbox goog-inline-block recaptcha-checkbox-unchecked rc-anchor-checkbox recaptcha-checkbox-expired" role="checkbox" aria-checked="false" id="recaptcha-anchor" tabindex="0" dir="ltr" aria-labelledby="recaptcha-anchor-label">  <button type="submit" class="button ctct-button button--block button-secondary" id="submit-form" data-enabled="enabled">sign up</button> 

i have tried using jquery

$("#recaptcha-anchor").change(function(){   alert("changed!");   $("#submit-form").show(); }); 

i have tried:

$(".recaptcha-checkbox").on('domsubtreemodified', function(){    alert("this has been clicked");    $("#submit-form").show(); }); 

any pointers might doing wrong? alert message not go off. have read jquery api's change, if there page me useful. thank you!

there no such event gets triggered on attribute change.

you should create custom event changing attribute , trigger you're changing in code. can listen , execute code want.

trigger custom event in function attribute gets changed

$(".recaptcha-checkbox").trigger('attribute-change'); 

then make event listener event , execute code.

$(".recaptcha-checkbox").on('attribute-change', function(){    alert("this has been clicked");    $("#submit-form").show(); }); 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -