matheusmurta
10/2/2019 - 1:24 PM

Jquery Clone Element temporarily

Jquery Clone Element temporarily


 //Ao carregar
 //Remover temporariamente a tarja ao abrir dashboard 
        if ( $('email-not-confirmed').length > 1) 
        {
            $("body").removeClass("email-not-confirmed");
            var els = $('body > a'), saved = els.clone (true);
            els.remove ();
        }
        
         //Ao Fechar pelo botao 
          if ( $('email-not-confirmed').length > 1) 
            {
                //Ao fechar o dashboard abrir novamente a tarja de confirmacao 
                 $(function () {
                   $("#modal-support-channel-close").click(function () {
                      $("body").addClass( "email-not-confirmed" );
                      saved.appendTo ($('body'));
                   });
                 });
            }