Ad manager - to check DFP content with jQuery

0 votes
180 views
added Jun 13, 2019 in Google tools by LC Marshal Captain (25,770 points)
if($(dfpFullSkinAdId).css('display') == 'none' || $(dfpFullSkinAdId).attr('style', '')){ 
    console.log('skin ads - none');
    $(this).hide();
    $(mainContent).css({'margin-top': '20px'});
    $(newsWrapr).css({'background': '#eee'});
}

 

1 Response

0 votes
responded Jun 14, 2019 by LC Marshal Captain (25,770 points)
// in most cases, display none condition are good enough
if($(dfpFullSkinAdId).css('display') == 'none'){ 
    console.log('skin ads - none');
    $(this).hide();
    $(mainContent).css({'margin-top': '20px'});
    $(newsWrapr).css({'background': '#eee'});
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...