skip to Main Content

I need your help. I have this code and I want to disable for sometimes. I tried to uncomment some few lines, it was still displaying. Please is there a single line here where i can comment it out to stop displaying on my site.

What if i comment out

// console.log(('1');

wiill it work?


    </style>
    <script type="text/javascript">
        jQuery('document').ready(function($){
            setInterval(function(){ 
                var popupCounter = sessionStorage.getItem("popupCounter");        
                if (popupCounter == '' || popupCounter == null) {
                    setTimeout(function(){
                        jQuery('.exit-poup-code-wrap').fadeIn();
                        sessionStorage.setItem("popupCounter",'1');                 
                    }, 1000);               
                }
               
                if(popupCounter == '1'){
                //  do nothing      
                return false;
                    clearInterval();
                }
                  console.log('1');
            }, 1000);
            $('body').on('click','.popup_exit_close', function(){
                $('.exit-poup-code-wrap').fadeOut();
            });
        });
    </script>```

in wordpress functions.php. The issue is that i don't want it to display/popup for now. And I don't want to delete it cos i will still needs

Please which line should i comment out, so that this popup won't display untill I uncomment the line. My javascript knowledge is below basic. 


I uncomment the some lines, but it didn't work, I didn't want to destroy the code, i hired someone to help develop it, but I can't him no longer

2

Answers


  1. You can use /* codes */ to comment out multiple lines:

    <script type="text/javascript">
    /*
    codes
    codes
    */
    </script>
    

    Alternatively, you should learn how to toggle comments for multiple lines quickly in your text editor / IDE.

    If you really want to minify the modification, you can add:

            jQuery('document').ready(function($){
                return;
                setInterval(function(){ 
    

    or comment out:

                        setTimeout(function(){
                            // jQuery('.exit-poup-code-wrap').fadeIn();
                            sessionStorage.setItem("popupCounter",'1');                 
                        }, 1000);   
    
    Login or Signup to reply.
  2. //jQuery(‘.exit-poup-code-wrap’).fadeIn();

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search