November 17th, 2021

Replying to a tweet from @brucel

Not very cunning, but I think you can do that DOM traversal in one go:

input.closest(‘fieldset’).querySelector(‘legend’)

51° N , 0° E

Also on Twitter

Reply Retweet Favourite

Responses

7 Likes

# Liked by Bruce Lawson on Wednesday, November 17th, 2021 at 6:27pm

# Liked by Aaron Farber on Wednesday, November 17th, 2021 at 6:28pm

# Liked by Marijn - ActiveBells 🎄 on Wednesday, November 17th, 2021 at 8:05pm

# Liked by Nadeem Shabir 🌷 on Wednesday, November 17th, 2021 at 8:05pm

# Liked by John F Croston III on Wednesday, November 17th, 2021 at 10:15pm

# Liked by JØⱤĐ₳₦ 💀 ĐØ฿₴Ø₦ on Wednesday, November 17th, 2021 at 10:16pm

# Liked by Nick Ribal @ 🇨🇷 on Thursday, November 18th, 2021 at 4:51am

Have you published a response to this? :