- 1

How to empty the second child element of the element with id="nav".?

//this is my answer var e = $(" #nav "). siblings(); e.eq( 1 ). empty (); //however this is uncorrect. please help !

13th Aug 2017, 11:52 AM
***
10 Respuestas
+ 2
Ya children() works
13th Aug 2017, 12:30 PM
***
+ 4
children() instead of siblings()?
13th Aug 2017, 12:26 PM
Paulax
Paulax - avatar
+ 3
That's hilarious joke!
27th Jul 2018, 7:33 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
.next() instead of .sibling() maybe?
13th Aug 2017, 12:01 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
But tha....If select with id....Won't jquery select only one element?
13th Aug 2017, 12:06 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
#nav children 1 empty
16th Feb 2022, 9:22 AM
Santosh Tajpuriya
Santosh Tajpuriya - avatar
0
nope
13th Aug 2017, 12:02 PM
***
0
Yeah even I was thinking so, but it is a challenge question and it is showing uncorrect
13th Aug 2017, 12:10 PM
***
0
children is right !
23rd Jul 2018, 5:47 PM
Raja Thamizharasan
Raja Thamizharasan - avatar
0
hfbc
30th Jul 2018, 12:10 PM
bipin Das