Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - Flag if element has CSS property display none

0 votes
89 views
added Nov 22, 2018 in jQuery by LC Marshal Lieutenant (18,470 points)
recategorized Dec 14, 2018 by LC Marshal
var dfpBndrlElemPre          = '#div-gpt-ad-',
      dfpBndrlId               = '1542075954162-0', // banderole id 
      dfpBndrlFullId           = '.banderole' + ' ' + dfpBndrlElemPre + dfpBndrlId;

if(($(dfpBndrlFullId).css('display') == 'none')){ 
    $('.banderole').hide();
     console.log('banderole hide');
}
else {
  $('.banderole').show();
  console.log('banderole show');
}

 

Please log in or register to response this reference.

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