連載 /

HTML/CSSを爆速コーディング Emmet入門

NEW POSTS

') } if(form.find('wpcf7-response-output').length == 0){ form.append('
') } form.closest('.ig_form_container').attr('id', form.find('input[name=_wpcf7_unit_tag]').val()); //_wpcf7_unit_tag } if(typeof _wpcf7 !== 'undefined'){ form.wpcf7InitForm(); }else{ form.submit( function( event ) { if ( typeof window.FormData !== 'function' ) { return; } wpcf7.submit( form ); event.preventDefault(); } ); } form.addClass('ig_form_init_done'); } }); }); } }); // init.icegram // Dismiss response text/div when shown within icegram form container jQuery('body').on('click', '.ig_form_container .wpcf7-response-output', function(e) { jQuery(e.target).slideUp(); }); // Handle CTA function(s) after successful submission of form jQuery( window ).on('wpcf7:mailsent', function(e) { if( typeof icegram !== 'undefined' ){ var msg_id = ((jQuery(e.target).closest('[id^=icegram_message_]') || {}).attr('id') || '').split('_').pop() || 0 ; var ig_msg = icegram.get_message_by_id(msg_id) || undefined; if(ig_msg && ig_msg.data.cta === 'form_via_ajax' && ig_msg.data.cta_option_form_via_ajax == 'hide_on_success'){ setTimeout(function(){ ig_msg.hide(); }, 2000); } } }); });