Good day! Tell adblock_button_close what could be the problem, the adblock_button_close button does not work, adBlockDetected in display: none styles display: none
var adBlockDetected = function() { $('.forCenterBlock').css('display', 'block'); } var adBlockUndetected = function() { $('.forCenterBlock').css('display', 'none'); } if(typeof FuckAdBlock === 'undefined') { $(document).ready(adBlockDetected); } else { fuckAdBlock.on(true, adBlockDetected).on(false, adBlockUndetected); } $(".adblock_button_close").click(function(){ $('.forCenterBlock').css('display', 'none'); }); There is a forCenterBlock div , which initially display: none; (spelled in css ). When the page loads, if FuckAdBlock === 'undefined' block forCenterBlock must be assigned to display:block; otherwise display: none; .
And there is an adblock_button_close button, which, on click, should assign the forCenterBlock display: none; block forCenterBlock display: none;
That button for some reason does not work)
FuckAdBlockandfuckAdBlockare two different variables. The errorfuckAdBlock is undefinedshould fall out - Sanya_ZolforCenterBlockblockforCenterBlock? Who indisplay:nonestyles? Almost nothing is clear. - Ivan Pshenitsynadblock_button_closebutton present on the page immediately upon its loading, or is it added later? - Ivan Pshenitsyn