View Single Post
Old 09-07-2012, 06:47 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
this is always true:
Code:
if (usernameSpan.textContent !== undefined) {
if it is without text, it will be null or "", not undefined, and the "!==" means it's picky about those.

try hitting all 3 while saving keystrokes:

Code:
if (usernameSpan.textContent) {
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%

Last edited by rnd me; 09-07-2012 at 06:49 AM..
rnd me is offline   Reply With Quote