jQuery - check if text in element is empty with .text

0 votes
271 views
added Dec 18, 2020 in jQuery by lcjr First Warrant Officer (11,990 points)
else if($(newsAuthor).text() == '') {
  newsMeta.css({'border-top': '1px solid #fff'});
  newsMeta.css({'padding-left': '0'}); 
  firstP.prepend(newsMeta);
  newsMeta.show();
}

 

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