View Single Post
Old 11-15-2012, 12:14 AM   PM User | #4
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Your sample code is stopping straight-away though as it immediately finds a (parent) LI and targ is still referring to the A that I clicked.

I'm a bit tired to correct it though at this time, soz. Try

Code:
while ((targ = targ.parentNode) && /* etc. */ ) 
    /* empty statement */ ;
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 11-15-2012 at 12:18 AM..
AndrewGSW is offline   Reply With Quote