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
You can use
/* codes */
to comment out multiple lines: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:
or comment out:
//jQuery(‘.exit-poup-code-wrap’).fadeIn();