If your button is generated by javascript you may add a transparent cover to intercept and block click events until the user accept the terms. HTML <div id="paypalButtonWrapper">
<div id="paypal-button"></div>
<div id="paypalButtonCover"></div>
</div>
<div id="paypal-accept">
<input type="checkbox" id="paypalAccept"/>
<label for="paypalAccept">I accept terms and conditions</label>
</div> CSS #paypalButtonWrapper {
position: relative;
}
#paypalButtonCover {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
cursor: pointer;
} Javascript The following code uses jQuery, but it can be easily converted to pure js (this is left as an exercise): $('#paypalButtonCover').click(function(e) {
alert("Please accept terms and conditions");
});
$('#paypalAccept').change(function() {
if ($(this).is(':checked')) {
$('#paypalButtonCover').hide();
} else {
$('#paypalButtonCover').show();
}
}); Regards
... View more