[php] modal
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- <?php
- $var = ' function wpcf_modal( data, print = false ){
- var data = JSON.parse(data);
- var html = \'<div class="wpneo-modal-wrapper"> \' +
- \' <div class="wpneo-modal-content"> \' +
- \'<div class="wpneo-modal-wrapper-head">\' +
- \'<h4 id="wpcf_modal_title">Message</h4><a href="javascript:;" class="wpneo-modal-close">×</a>\';
- if( print ){
- html += \'</div><span class="wpcf-print-button button">Print</span>\';
- }
- html += \'<div class="wpneo-modal-content-inner"><div id="wpcf_modal_message"></div></div></div></div>\';
- if ($(\'.wpneo-modal-wrapper\').length == 0){
- $(\'body\').append(html);
- if (data.redirect){
- if ( $(\'#wpneo_crowdfunding_redirect_url\').length == 0 ){
- $(\'body\').append(\'<input type="hidden" id="wpneo_crowdfunding_redirect_url" value="\'+data.redirect+\'" />\');
- }
- }
- }
- if (data.success == 1){
- if(data.message){
- $(\'.wpneo-modal-wrapper #wpcf_modal_message\').html( data.message );
- }
- if(data.title){
- $(\'.wpneo-modal-wrapper #wpcf_modal_title\').html( data.title );
- }
- $(\'.wpneo-modal-wrapper\').css({\'display\': \'block\'});
- if ( $(\'#wpneofrontenddata\').length > 0 ){
- $("#wpneofrontenddata")[0].reset();
- }
- return true;
- }else {
- $(\'.wpneo-modal-wrapper #wpcf_modal_message\').html(data.message);
- $(\'.wpneo-modal-wrapper\').css({\'display\': \'block\'});
- return false;
- }
- }
- window.wpcf_modal = wpcf_modal; //make global function';
Editor
You can edit this paste and save as new: