Reputation: 501
I want to fire a jQuery event onclick when the user selects the recaptcha checkbox.
This is the code I have:
<div id="reCaptcha" data-sitekey="XXXXX"></div>
Is this possible to do? I've tried the usual jQuery onclick event (see below) for that element but to no avail.
$j('#reCaptcha').on('click', function(event) {
alert("YES PLEASE!");
});
Upvotes: 6
Views: 3979
Reputation: 1
HTML:
<div id="reCaptcha" data-sitekey="XXXXX"></div>
Then:
$j('#reCaptcha').on('click', function(event) {
alert("Your code works!");
});
Upvotes: 0
Reputation: 1383
reCaptcha have callback function which you can provide by using data as eg
<div id="reCaptcha" data-callback="thecallback"
data-sitekey="XXXXX"></div>
then you can write you call back after click
function thecallback(){
alert("Clicked")
}
that is what is legally possible hp[e it will help you
Upvotes: 0