JQuery — Adding any image or loader after hitting submit on form within gravity form

 

// <![CDATA[
function gformInitSpinner_14() { jQuery('#gform_14').submit(function() { if (jQuery('#gform_ajax_spinner').length == 0) { jQuery( '.gform_image_button' ).after('<' + 'img src="http://www.lawfirmlift.com/wp-content/themes/lfmarketing/images/icons/benefits/news.png" alt="" />' ); } }); }
// ]]></script><script>// <![CDATA[ $('.gform_image_button').on('click', function(){ $('.gform_image_button').addClass('opacity'); //$('.modal').modal(); }); $('.gform_image_button').on('click', function(){ $('.gform_image_button').addClass('opacity'); //$('.modal').modal(); }); $('document').bind('gform_confirmation_loaded', function((){ alert('this is the ened'); }); // ]]>