2017-02-17 12 views
0

後は、私はdivのコンテンツを非表示にするには、これまで行っているコードです。しかし残念ながら、それはCRMオンラインでは働いていません。非表示のdivコンテンツ

function hideSocialEmailErrorMsgBlock() { 
     debugger; 
     var _errorMsgBlock = document.getElementById("emailnotification"); 
     var _warningMessage = document.getElementById("warningmessage"); 
     if ((errorMsgBlock == null && errorMsgBlock == undefined) || (warningMessage == null && warningMessage != undefined)) 
     { 
     setTimeout(hideSocialEmailErrorMsgBlock, 1000); 
     return; 
     } 
     else 
     { 
     document.getElementById("emailnotification").innerHTML = ''; 
     document.getElementById("warningmessage").innerHTML = ''; 
     // code has to be placed here... 
     // $("#warningmessage").hide(); 
     // $("warningmessage").attributes("style.display","none"); 
     // $("emailnotification").attributes("style.display","none"); 
     //$("#emailnotification").hide(); 
     setTimeout(hideSocialEmailErrorMsgBlock, 1000); 
     } 
    } 

フロントエンドのイメージです。ここで

enter image description here

ウェブページの画像です。

enter image description here

私は、Webページ上の表示エラーを非表示にする必要があります。あなたは完全にJavascriptであなたのemailnotification div要素を非表示にする場合

+0

あなたは永久にそれを非表示にしたいですか? – Varun

+0

はyesと答えることができますか? –

+1

あなたはCSSでそれを隠すことができます。 '.emailnotification {display:none!important; } ' – Varun

答えて

1

、あなただけ使用することができます。

のdocument.getElementById( 'emailnotification')style.display = 'なし';

これは、すべてのテキストを非表示にするより簡単な方法です。

+0

または.hide()関数を使用してjqueryを試すことができます。 –