Полезное Tilda

ZERO блок popup

<style>
.t-popup__container {
background: none !important; right: 0 !important;left: 0 !important;;
}
.shirina{
background:none !important; right: 0 !important;left: 0 !important;} 
.parpadding{padding:0 !important;}
.tn-atom .t-form__errorbox-wrapper, .tn-form__errorbox-popup , .t-form-success-popup {
z-index: 9999999 !important;
}
</style>

<a class="zeropopup" href="#popup:zero"></a>
<script>
$( document ).ready(function() {
var PopWindID = '#rec369116165 .t-popup__container';
$(PopWindID).empty();
$(PopWindID).addClass('shirina').parent('.t-popup').addClass('parpadding');
 var zeroelem=0; var firstcall=true;var zeroid=0;
 var ZeroPopID = {

  "#popupzero-form":"#rec369116501",
  "#popupzero-menu":"#rec369116505"


};

$.each(ZeroPopID, function( key, value ) { $(value).addClass('pZero').hide();});
$('a[href^="#popupzero"]').click(function(e) {e.preventDefault();
 zeroid = ZeroPopID[$(this).attr('href')]
 if (zeroid==zeroelem || firstcall){
      $($(ZeroPopID[$(this).attr('href')])).appendTo(PopWindID);
      $(ZeroPopID[$(this).attr('href')]).show();$('.zeropopup').click();
      firstcall=false;zeroelem=zeroid;$('.t396').trigger('displayChanged');
 }else{
     $(zeroelem).hide();
     $($(ZeroPopID[$(this).attr('href')])).appendTo(PopWindID);
     $(ZeroPopID[$(this).attr('href')]).show();$('.zeropopup').click();zeroelem=zeroid;
     $('.t396').trigger('displayChanged');
};
});
$(document).on('click','a[href="#close"], .pZero .t396__filter',function(e){e.preventDefault();t390_closePopup(PopWindID.replace(/[^0-9]/gim, ""))});

 var observer = new MutationObserver(function (mutations) {
    mutations.forEach(function (mutation) {
        var newVal = $(mutation.target).prop(mutation.attributeName);
        if (mutation.attributeName === "class") {
            if(!$('.parpadding ').hasClass("t-popup_show")) {$(zeroid+' iframe').attr( 'src', function ( i, val ) { return val; });};
            if($('.t-body').hasClass("t-body_success-popup-showed")) {
             setTimeout(function(){t390_closePopup(PopWindID.replace(/[^0-9]/gim, ""));window.tildaForm.closeSuccessPopup();}, 1000);
            };
          };});});
observer.observe( document.body, {  attributes: true});
}); 
</script>
Zero
Made on
Tilda