I'm trying to bind js event on Gravity Forms submission. I've enabled ajax for that form, I tried solutions described on official Gravity Forms support forum and example from here but they didn't work for me, also I've read documentation on GF official site, but it didn't clear the situation for me. I wonder where problem is, my site is on WordPress v.4.7.11 with jQuery v.1.12.4. Here is code I've placed as html element in my form:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(document).bind('gform_confirmation_loaded', function(event,
form_id){
if(form_id == 132){
console.log("success");
}
});
});
</script>
P.S. Here is the code that works, but it works after form is rendered:
<script type="text/javascript">
jQuery(document).on('gform_post_render', function(){
console.log("success");
});
</script>
Any help and tips would be appreciated, thanks.